Skip to content

Commit

Permalink
Use yarn in dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
FOSSforlife committed Jun 27, 2022
1 parent abaf3da commit d35b4c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM node:lts as build
WORKDIR /usr/src/app
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
RUN npm install --silent && mv node_modules ../
RUN yarn && mv node_modules ../
COPY . .
RUN chown -R node /usr/src/app
USER node
Expand All @@ -11,7 +11,7 @@ FROM node:lts as prod
ENV NODE_ENV=production
WORKDIR /usr/src/app
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
RUN npm ci --production --silent && mv node_modules ../
RUN yarn install --production --frozen-lockfile && mv node_modules ../
COPY --from=build /usr/src/app/dist /usr/src/app/dist
RUN chown -R node /usr/src/app
USER node
Expand Down

0 comments on commit d35b4c7

Please sign in to comment.