diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 2efdc2f99..6d85b3cf1 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -12,24 +12,24 @@ jobs: packages: write steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 - name: Docker Setup Buildx - uses: docker/setup-buildx-action@v1.6.0 + uses: docker/setup-buildx-action@v3.3.0 with: buildkitd-flags: --debug - name: Log in to DockerHub Container registry - uses: docker/login-action@v1 + uses: docker/login-action@v3.1.0 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Log in to GitHub Container registry - uses: docker/login-action@v1 + uses: docker/login-action@v3.1.0 with: registry: ghcr.io username: ${{ github.actor }} @@ -40,7 +40,7 @@ jobs: uses: martinbeentjes/npm-get-version-action@master - name: Build and push - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5.3.0 with: context: . platforms: linux/amd64,linux/arm64,linux/arm/v7 diff --git a/Dockerfile b/Dockerfile index 8f590165b..447b48416 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ # Install necessary dependencies to install the app's dependencies -FROM node:16-alpine as base_dependencies +FROM node:18-alpine as base_dependencies RUN apk add --no-cache make gcc g++ python3 git RUN npm install -g pnpm # Ignore the app's version to avoid an unnecessary dependency install -FROM node:16-alpine as version_cache_fix +FROM node:18-alpine as version_cache_fix WORKDIR /cache COPY package*.json ./ # '3d' is the 3rd line of package*.json @@ -24,14 +24,14 @@ COPY --from=version_cache_fix /cache /cache RUN pnpm prune --prod # compile the app using the cached dev dependencies -FROM node:16-alpine as builder +FROM node:18-alpine as builder WORKDIR /app COPY . . COPY --from=app_building_dependencies /cache/node_modules ./node_modules RUN npm run build # copy the cached dependencies, copy the compiled code and set entrypoint -FROM node:16-alpine as release +FROM node:18-alpine as release WORKDIR /app COPY package*.json ./ COPY --from=app_production_dependencies /cache/node_modules ./node_modules diff --git a/Dockerfile.dev b/Dockerfile.dev index a7c0c852c..13aee1f7f 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -1,4 +1,4 @@ -FROM node:16-alpine as node_modules_cache +FROM node:18-alpine as node_modules_cache WORKDIR /cache/ RUN apk add --no-cache make gcc g++ python3 git @@ -7,7 +7,7 @@ RUN npm install -g pnpm RUN pnpm install --strict-peer-dependencies=false -FROM node:16-alpine +FROM node:18-alpine WORKDIR /app RUN apk add --no-cache git diff --git a/package.json b/package.json index 31cb0fad2..afe69d171 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "member-counter-bot", "version": "0.0.0-verified-bot-edition-dev", "engines": { - "node": ">=16.0" + "node": ">=18.0" }, "description": "", "main": "./dist/src/index.js",