From 640e682fbee5f6fb7826fb1d896f773b3e3ed418 Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Fri, 30 Oct 2026 11:41:35 +1100 Subject: [PATCH] fix: allow Alpine package updates in Docker builds --- Dockerfile | 9 ++++++--- README.md | 5 +++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index cfee036..77bc103 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,8 @@ ARG PNPM_VERSION=11.15.1 FROM node:${NODE_VERSION}-alpine3.24 AS build +ARG PNPM_VERSION + RUN apk upgrade --no-cache \ && apk add --no-cache bash @@ -24,12 +26,13 @@ ARG OPENSSL_VERSION=3.5.8-r0 # Use Alpine's dynamically linked Node.js package so the runtime receives the # patched system OpenSSL libraries without carrying npm or Node.js headers. +# Keep minimum patched versions while allowing Alpine repository updates. RUN apk upgrade --no-cache \ && apk add --no-cache \ bash \ - "libcrypto3=${OPENSSL_VERSION}" \ - "libssl3=${OPENSSL_VERSION}" \ - "nodejs-current=${ALPINE_NODE_VERSION}" \ + "libcrypto3>=${OPENSSL_VERSION}" \ + "libssl3>=${OPENSSL_VERSION}" \ + "nodejs-current>=${ALPINE_NODE_VERSION}" \ && addgroup -S -g 10001 app \ && adduser -S -D -H -h /app -u 10001 -G app app diff --git a/README.md b/README.md index f3d7249..1299b88 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,9 @@ Group API built on modern frameworks for managing all group-related Topcoder nee Use Node.js 26.5.1 and pnpm 11.15.1. Run `nvm use` in this project before running pnpm commands. The production image runs as the unprivileged `app` user. Its Alpine 3.24 -runtime installs Node.js 26.5.1 and the patched system OpenSSL 3.5.8 packages; -the Node.js build toolchain and npm are not copied into the runtime image. +runtime installs Node.js >=26.5.1 and system OpenSSL >=3.5.8 from the Alpine +repositories, allowing package updates while retaining the minimum patched +versions. The Node.js build toolchain and npm are not copied into the runtime image. ## Project setup