Skip to content

Commit

Permalink
Add base-image env-var to Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
JonJagger committed Oct 2, 2023
1 parent 7d0dd9b commit 5cee400
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion sources/client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
FROM cyberdojo/sinatra-base:08fbd2d
ARG BASE_IMAGE=cyberdojo/sinatra-base:6b753be
FROM ${BASE_IMAGE}
LABEL maintainer=jon@jaggersoft.com

WORKDIR /app
COPY --chown=nobody:nogroup . .

ARG COMMIT_SHA
ENV SHA=${COMMIT_SHA}
ENV COMMIT_SHA=${COMMIT_SHA}

# ARGs are reset after FROM See https://github.com/moby/moby/issues/34129
ARG BASE_IMAGE
ENV BASE_IMAGE=${BASE_IMAGE}

USER nobody
HEALTHCHECK --interval=1s --timeout=1s --retries=5 --start-period=5s CMD /app/config/healthcheck.sh
Expand Down
8 changes: 7 additions & 1 deletion sources/server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
FROM cyberdojo/sinatra-base:08fbd2d
ARG BASE_IMAGE=cyberdojo/sinatra-base:6b753be
FROM ${BASE_IMAGE}
LABEL maintainer=jon@jaggersoft.com

WORKDIR /app
COPY --chown=nobody:nogroup . .

ARG COMMIT_SHA
ENV SHA=${COMMIT_SHA}
ENV COMMIT_SHA=${COMMIT_SHA}

# ARGs are reset after FROM See https://github.com/moby/moby/issues/34129
ARG BASE_IMAGE
ENV BASE_IMAGE=${BASE_IMAGE}

USER nobody
HEALTHCHECK --interval=1s --timeout=1s --retries=5 --start-period=5s CMD /app/config/healthcheck.sh
Expand Down

0 comments on commit 5cee400

Please sign in to comment.