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

Commit 7f780ca

Browse files
committed
Add --frozen-lockfile to docker image yarn install
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
1 parent 4b79c15 commit 7f780ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RUN apk add --update --no-cache --virtual build-dependances \
2121

2222
ADD package.json $APP_HOME/package.json
2323
ADD yarn.lock $APP_HOME/yarn.lock
24-
RUN yarn
24+
RUN yarn install --frozen-lockfile
2525

2626
ADD . $APP_HOME/
2727

0 commit comments

Comments
 (0)