From 49aa86106bff019991faf027535b4f9335f1f451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Thu, 4 Jul 2024 17:36:02 +0200 Subject: [PATCH] Pull dependencies from the runner It has access to the internet. --- .github/workflows/docker-publish.yml | 6 ++---- Dockerfile | 5 +---- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 718fdac..5d5fb1e 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -63,10 +63,8 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - name: Unconfigure npm proxy - run: | - npm config rm proxy - npm config rm https-proxy + - name: Pull yarn dependencies + run: yarn install - name: Build and push Docker image id: build-and-push diff --git a/Dockerfile b/Dockerfile index a021b22..cc2dc04 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,10 +11,7 @@ EXPOSE 3000 USER node -COPY --chown=node:node package.json /home/node/app/package.json -COPY --chown=node:node yarn.lock /home/node/app/yarn.lock COPY --chown=node:node dist /home/node/app/dist - -RUN yarn install --network-timeout 1000000 +COPY --chown=node:node node_modules /home/node/app/node_modules CMD ["node", "dist/src/index.js"]