generated from ministryofjustice/hmpps-template-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DT-2502 Use latest Dockerfile from template project (#2)
- Loading branch information
1 parent
80b15f7
commit 3078f06
Showing
1 changed file
with
7 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]>" | ||
|
||
|
@@ -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 | ||
|