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

Commit

Permalink
Add --frozen-lockfile to docker image yarn install
Browse files Browse the repository at this point in the history
Webpacker 5.1.0 removed yarn integrity checker. This commit ensures that
we also use the yarn.lock we generated while developing rather than updating
it. It should also fail if package.json & yarn.lock are out of sync.

Yarn's own maintainer discourages its use:
yarnpkg/yarn#6427 (comment)
and suggests the following solution:
Solution
Remove the integrity initializer and the configuration options. Encourage
developers to ensure yarn install in local environments and
yarn install --frozen-lockfile as part of deployment.

Other references:
https://classic.yarnpkg.com/en/docs/cli/install#toc-yarn-install-frozen-lockfile
rails/webpacker#2518
  • Loading branch information
aliuk2012 committed Apr 21, 2020
1 parent 4b79c15 commit 7f780ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Expand Up @@ -21,7 +21,7 @@ RUN apk add --update --no-cache --virtual build-dependances \

ADD package.json $APP_HOME/package.json
ADD yarn.lock $APP_HOME/yarn.lock
RUN yarn
RUN yarn install --frozen-lockfile

ADD . $APP_HOME/

Expand Down

0 comments on commit 7f780ca

Please sign in to comment.