Skip to content

Commit 8929444

Browse files
committed
Split build stages into core and production
1 parent 816f505 commit 8929444

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Dockerfile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ RUN apk add --no-cache \
3939
libffi \
4040
openssl \
4141
pango \
42-
# fonts
43-
ttf-opensans \
44-
ttf-dejavu \
4542
ghostscript-fonts \
4643
# Used as the entrypoint
4744
tini \
@@ -91,7 +88,7 @@ COPY . .
9188
ARG GITHUB_SHA
9289
ENV SENTRY_RELEASE=$GITHUB_SHA
9390

94-
FROM builder AS production
91+
FROM builder AS core
9592
# Named stage so it can be optimized in the future. (Stage name is referenced by CI build script.)
9693

9794
COPY pdf_service ./pdf_service
@@ -105,3 +102,11 @@ HEALTHCHECK --interval=2s --timeout=2s --retries=5 --start-period=2s CMD curl --
105102

106103
CMD tini gunicorn -w $WORKER_COUNT -t 0 -b 0.0.0.0:8080 pdf_service:pdf_service
107104
EXPOSE 8080
105+
106+
FROM core AS production
107+
108+
USER root
109+
RUN apk add --no-cache \
110+
ttf-opensans \
111+
ttf-dejavu
112+
USER pdf_service_user

0 commit comments

Comments
 (0)