From 2473f6859c650f3c888d4b9ae73ead816bb3dc4e Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 29 Oct 2024 14:54:36 +0000 Subject: [PATCH] Updating dockerfiles to contain the network-concurrency 1 option. --- hosting/single/Dockerfile | 2 +- packages/server/Dockerfile | 2 +- packages/worker/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hosting/single/Dockerfile b/hosting/single/Dockerfile index a1230f3c37..a243e8cddc 100644 --- a/hosting/single/Dockerfile +++ b/hosting/single/Dockerfile @@ -22,7 +22,7 @@ RUN ./scripts/removeWorkspaceDependencies.sh packages/worker/package.json RUN jq 'del(.scripts.postinstall)' package.json > temp.json && mv temp.json package.json RUN ./scripts/removeWorkspaceDependencies.sh package.json -RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn install --production --frozen-lockfile +RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn install --production --frozen-lockfile --network-concurrency 1 # copy the actual code COPY packages/server/dist packages/server/dist diff --git a/packages/server/Dockerfile b/packages/server/Dockerfile index 2206d49d9b..8dec5b6771 100644 --- a/packages/server/Dockerfile +++ b/packages/server/Dockerfile @@ -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 \ +RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn install --production=true --network-timeout 1000000 --network-concurrency 1 \ && 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 diff --git a/packages/worker/Dockerfile b/packages/worker/Dockerfile index 4b708626f3..807a91de5f 100644 --- a/packages/worker/Dockerfile +++ b/packages/worker/Dockerfile @@ -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 +RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn install --production=true --network-timeout 1000000 --network-concurrency 1 # Remove unneeded data from file system to reduce image size RUN apk del .gyp \ && yarn cache clean