From 109bffdeb6b21945cab36801d4fc6a453ce79ab9 Mon Sep 17 00:00:00 2001 From: RAR Date: Sat, 30 Dec 2023 11:57:49 +0100 Subject: [PATCH] fix: Possible fix for Github actions stuck --- .../build-and-push-docker-base-image.yml | 44 ------------------- Dockerfile | 10 ++--- 2 files changed, 5 insertions(+), 49 deletions(-) delete mode 100644 .github/workflows/build-and-push-docker-base-image.yml diff --git a/.github/workflows/build-and-push-docker-base-image.yml b/.github/workflows/build-and-push-docker-base-image.yml deleted file mode 100644 index da591d40..00000000 --- a/.github/workflows/build-and-push-docker-base-image.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Build and push Docker base image - -on: - push: - paths: - - ./Dockerfile.base - branches: - - main - workflow_dispatch: - -env: - ALPINE_VERSION: 3.16 - -jobs: - build-and-push-docker-base-image: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v2 - with: - context: . - platforms: linux/amd64,linux/arm64,linux/arm/v7 - file: Dockerfile.base - build-args: ALPINE_VERSION=${{ env.ALPINE_VERSION }} - push: true - tags: | - ghcr.io/rargames/4gaboards:base-latest - ghcr.io/rargames/4gaboards:base-${{ env.ALPINE_VERSION }} diff --git a/Dockerfile b/Dockerfile index a5355ed2..22cedee0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,19 +4,19 @@ WORKDIR /app COPY server/package.json server/package-lock.json . -RUN npm install npm@latest --global -RUN npm install pnpm --global +RUN npm install npm@latest --global --no-cache +RUN npm install pnpm --global --no-cache RUN pnpm import RUN pnpm install --prod -FROM node:lts AS client +FROM node:20-alpine AS client WORKDIR /app COPY client/package.json client/package-lock.json . -RUN npm install npm@latest --global -RUN npm install pnpm --global +RUN npm install npm@latest --global --no-cache +RUN npm install pnpm --global --no-cache RUN pnpm import RUN pnpm install --prod