diff --git a/Dockerfile b/Dockerfile index 4fce584..0e52271 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ # Stage: base image -FROM node:14.17-buster-slim as base +ARG BUILD_NUMBER +ARG GIT_REF -ARG BUILD_NUMBER=1_0_0 -ARG GIT_REF=not-available +FROM node:14.17-buster-slim as base LABEL maintainer="HMPPS Digital Studio " @@ -19,6 +19,8 @@ RUN apt-get update && \ # Stage: build assets FROM base as build +ARG BUILD_NUMBER +ARG GIT_REF RUN apt-get install -y make python g++ @@ -28,6 +30,8 @@ RUN CYPRESS_INSTALL_BINARY=0 npm ci --no-audit COPY . . RUN npm run build +ENV BUILD_NUMBER ${BUILD_NUMBER:-1_0_0} +ENV GIT_REF ${GIT_REF:-dummy} RUN export BUILD_NUMBER=${BUILD_NUMBER} && \ export GIT_REF=${GIT_REF} && \ npm run record-build-info