Skip to content

Commit a5b5719

Browse files
authored
Merge pull request #188 from BuckinghamAJ/feature/node_20_upgrade
Upgrading to Node 20 (Ticket 109)
2 parents 916d6aa + 7757843 commit a5b5719

5 files changed

Lines changed: 7352 additions & 27456 deletions

File tree

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Node Building Image
2-
FROM node:16
2+
FROM node:20
33

44
# create app directory
55
WORKDIR /opt/api
@@ -14,7 +14,7 @@ COPY .snyk ./
1414

1515
RUN touch winston.log.json
1616

17-
RUN npm cache clean --force
17+
RUN yarn cache clean
1818

1919
# Get environment argument passed in
2020
ARG environment
@@ -26,15 +26,15 @@ ENV NODE_ENV=${environment:-$default_environment}
2626
# Set SNYK TOKEN environment variable
2727
ARG SNYK_TOKEN
2828
ENV SNYK_TOKEN ${SNYK_TOKEN}
29-
RUN npm install snyk@latest -g
29+
RUN yarn global add snyk@latest
3030
RUN snyk auth ${SNYK_TOKEN}
3131

3232

3333
# Check environment and install dependencies
3434
# Note: When the NODE_ENV environment variable is set to 'production' npm
3535
# will not install modules listed in devDependencies
3636
# Reference: https://docs.npmjs.com/cli/v8/commands/npm-install
37-
RUN npm install
37+
RUN yarn install
3838

3939
# Bundle app source
4040
COPY server/ ./server

0 commit comments

Comments
 (0)