-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
63 lines (56 loc) · 2.02 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
FROM openjdk:23-jdk-slim-bookworm
LABEL maintainer="Henning C. Nielsen"
LABEL org.opencontainers.image.description="FHIR Implementation Guide Publisher"
LABEL org.opencontainers.image.vendor="Trifork"
ARG user=publisher
ARG group=publisher
ARG uid=1000
ARG gid=1000
# GitHub workflows hardcodes the HOME dir to /github/home
ARG HOME=/github/home
ARG IG_PUB_VERSION # Is set by the pipeline
# https://github.com/codacy/codacy-hadolint/blob/master/docs/description/DL4006.md
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# https://github.com/nodesource/distributions?tab=readme-ov-file#debian-versions
# hadolint ignore=DL3008,DL3028,DL3016
RUN sed -i 's/^Components: main$/& contrib/' /etc/apt/sources.list.d/debian.sources \
&& apt-get update \
&& apt-get install --yes --no-install-recommends \
build-essential \
jq \
yq \
git \
curl \
ruby \
ruby-dev \
libfreetype6 \
# Fixes Spring Boot FontConfiguration exceptions - https://coderanch.com/t/761996/frameworks/Docker-Spring-boot-giving-sun
ttf-mscorefonts-installer \
fontconfig \
&& fc-cache -f -v \
&& curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \
&& apt-get install --yes --no-install-recommends nodejs \
\
&& gem install \
bundler \
jekyll \
\
&& npm install -g fsh-sushi \
\
&& mkdir input-cache \
&& curl -fsSL https://github.com/HL7/fhir-ig-publisher/releases/download/${IG_PUB_VERSION}/publisher.jar -o input-cache/publisher.jar \
\
&& apt-get autoremove --yes curl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
\
&& groupadd -g ${gid} ${group} \
&& useradd -l -u ${uid} -g ${group} -m ${user} -d $HOME \
&& mkdir -p $HOME/fhir-package-cache \
&& chown -R ${uid} $HOME
# Do not run the entrypoint as root. That is a security risk.
# .. but unfortunately GitHub workflows do not support running as non-root
# https://github.com/actions/checkout/issues/1575
# USER ${uid}:${gid}
WORKDIR $HOME
ENTRYPOINT [ "java", "-jar", "/input-cache/publisher.jar"]