Merge pull request #3501 from backstage/rugvip/smol

backend: remove yarn cache from built docker image
This commit is contained in:
Patrik Oldsberg
2020-12-01 11:53:31 +01:00
committed by GitHub
4 changed files with 16 additions and 3 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ WORKDIR /usr/src/app
# and along with yarn.lock and the root package.json, that's enough to run yarn install.
ADD yarn.lock package.json skeleton.tar ./
RUN yarn install --frozen-lockfile --production
RUN yarn install --frozen-lockfile --production --network-timeout 300000 && rm -rf "$(yarn cache dir)"
# This will copy the contents of the dist-workspace when running the build-image command.
# Do not use this Dockerfile outside of that command, as it will copy in the source code instead.
@@ -7,7 +7,7 @@ WORKDIR /usr/src/app
# and along with yarn.lock and the root package.json, that's enough to run yarn install.
ADD yarn.lock package.json skeleton.tar ./
RUN yarn install --frozen-lockfile --production
RUN yarn install --frozen-lockfile --production --network-timeout 300000 && rm -rf "$(yarn cache dir)"
# This will copy the contents of the dist-workspace when running the build-image command.
# Do not use this Dockerfile outside of that command, as it will copy in the source code instead.