Skip to content
This repository has been archived by the owner on Jan 14, 2022. It is now read-only.

Commit

Permalink
Use lockfile, yarn, --frozen-lockfile
Browse files Browse the repository at this point in the history
Noticed a discussion on this in another thread.

It's best not to mix yarn and npm.  You should also use `--frozen-lockfile` or `--pure-lockfile` when installing into a docker image.  yarnpkg/yarn#4147
  • Loading branch information
subdavis authored Mar 9, 2020
1 parent ee379b1 commit fa647bd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docker/client.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
FROM node

COPY web/package.json /client/package.json
COPY web/yarn.lock /client/yarn.lock
WORKDIR /client
RUN npm install
RUN yarn install --frozen-lockfile
COPY web /client
RUN yarn run build --mode docker

FROM nginx
RUN rm -rf /usr/share/nginx/html/*
COPY --from=0 /client/dist /usr/share/nginx/html
COPY --from=0 /client/dist /usr/share/nginx/html

0 comments on commit fa647bd

Please sign in to comment.