From 3078f06a8dd8a6965d51f7e8982fe104089f0f8a Mon Sep 17 00:00:00 2001 From: Mike Halma <58170926+mikehalmamoj@users.noreply.github.com> Date: Wed, 8 Sep 2021 14:44:20 +0100 Subject: [PATCH] DT-2502 Use latest Dockerfile from template project (#2) --- Dockerfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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