Skip to content

Commit

Permalink
Merge pull request #14914 from Budibase/fix/no-yarn-cache
Browse files Browse the repository at this point in the history
Removing yarn caching from docker builds.
  • Loading branch information
mike12345567 authored Oct 29, 2024
2 parents ab34224 + b433f0f commit 70b1326
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ RUN chmod +x ./scripts/removeWorkspaceDependencies.sh
RUN ./scripts/removeWorkspaceDependencies.sh package.json

# Install yarn packages with caching
RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn install --production=true --network-timeout 1000000 --network-concurrency 1 \
RUN yarn install --production=true --network-timeout 1000000 \
&& yarn cache clean \
&& apk del g++ make python3 jq \
&& rm -rf /tmp/* /root/.node-gyp /usr/local/lib/node_modules/npm/node_modules/node-gyp
Expand Down
2 changes: 1 addition & 1 deletion packages/worker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ COPY packages/worker/dist/yarn.lock .

RUN ../scripts/removeWorkspaceDependencies.sh package.json

RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn install --production=true --network-timeout 1000000 --network-concurrency 1
RUN yarn install --production=true --network-timeout 1000000
# Remove unneeded data from file system to reduce image size
RUN apk del .gyp \
&& yarn cache clean
Expand Down

0 comments on commit 70b1326

Please sign in to comment.