File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# # Node Building Image
2- FROM node:16
2+ FROM node:20
33
44# create app directory
55WORKDIR /opt/api
@@ -14,7 +14,7 @@ COPY .snyk ./
1414
1515RUN touch winston.log.json
1616
17- RUN npm cache clean --force
17+ RUN yarn cache clean
1818
1919# Get environment argument passed in
2020ARG environment
@@ -26,15 +26,15 @@ ENV NODE_ENV=${environment:-$default_environment}
2626# Set SNYK TOKEN environment variable
2727ARG SNYK_TOKEN
2828ENV SNYK_TOKEN ${SNYK_TOKEN}
29- RUN npm install snyk@latest -g
29+ RUN yarn global add snyk@latest
3030RUN 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
4040COPY server/ ./server
You can’t perform that action at this time.
0 commit comments