Skip to content

Commit 9c5ea2b

Browse files
committed
Add the version/revision in the Dockerfile
1 parent 2f7cb17 commit 9c5ea2b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docker/dockerfiles/Dockerfile.backend

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ ENV PATH=/root/.local/bin:$PATH
7777
# activate the virtualenv:
7878
RUN . "${VIRTUAL_ENV}/bin/activate"
7979

80+
ARG VERSION
81+
ARG REVISION
82+
83+
ENV VERSION=${VERSION}
84+
ENV REVISION=${REVISION}
85+
86+
RUN touch /var/www/seismic/.version && \
87+
echo "$VERSION+$(echo ${REVISION} | cut -c 1-7)" > /var/www/seismic/.version
88+
8089
ENTRYPOINT ["/init"]
8190

8291
EXPOSE 80

0 commit comments

Comments
 (0)