From a760086d92c4908bedb3c9b77a21067ececf89f3 Mon Sep 17 00:00:00 2001 From: EdJoPaTo Date: Tue, 21 Jan 2025 18:40:17 +0100 Subject: [PATCH] build: require Node.js 22 and base container on alpine 3.21 --- .dockerignore | 6 +++--- .github/workflows/nodejs.yml | 2 +- Dockerfile | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.dockerignore b/.dockerignore index 0b0ada6..43ddbce 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,14 +2,14 @@ *.md **/*.test.* **/test.* -botfather-settings -coverage dist Dockerfile -init-debug-environment.sh node_modules test +botfather-settings +init-debug-environment.sh + # botfiles additionalEvents eventfiles diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 0000104..09851df 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 - uses: actions/checkout@v4 - run: npm ci - run: npm test diff --git a/Dockerfile b/Dockerfile index abebbd5..47240ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/library/node:20-alpine AS builder +FROM docker.io/library/node:22-alpine AS builder RUN apk upgrade --no-cache WORKDIR /build COPY package.json package-lock.json ./ @@ -7,16 +7,16 @@ COPY . ./ RUN node_modules/.bin/tsc -FROM docker.io/library/node:20-alpine AS packages +FROM docker.io/library/node:22-alpine AS packages RUN apk upgrade --no-cache WORKDIR /build COPY package.json package-lock.json ./ RUN npm ci --no-audit --no-fund --no-update-notifier --omit=dev -FROM docker.io/library/node:20-alpine AS final +FROM docker.io/library/alpine:3.21 AS final RUN apk upgrade --no-cache \ - && apk --no-cache add git + && apk add --no-cache nodejs git WORKDIR /app ENV NODE_ENV=production