From fdd6b8a51fe91fa4ecbed29ac8660fbf87de0871 Mon Sep 17 00:00:00 2001 From: Liosha84 Date: Thu, 5 Nov 2026 14:36:58 +0100 Subject: [PATCH] =?UTF-8?q?Dockerfile=20=D0=B1=D0=B5=D0=B7=20Alpine:=20?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=92=D0=9C=20staging=20=D0=B1=D0=B8=D0=BD?= =?UTF-8?q?=D0=B0=D1=80=D0=BD=D0=B8=D0=BA=D0=B8=20Alpine=203.24.3=20=D0=BF?= =?UTF-8?q?=D0=B0=D0=B4=D0=B0=D1=8E=D1=82=20(Bus=20error),=20curl=20=D0=B2?= =?UTF-8?q?=20healthcheck=20=D1=82=D0=BE=D0=B6=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit α Co-Authored-By: Claude Opus 5.5 --- backend/Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index eab332b..b9c58ae 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,7 +1,9 @@ # Build context: repository root (docker compose: context ".", dockerfile backend/Dockerfile) +# No Alpine images: on Jambotron staging VMs (kernel 6.18.55-virt) binaries from Alpine 3.24.3 +# (musl 1.2.6) die with "Bus error" — java survived, curl in the healthcheck did not (2026-11-05) # 1. Web client (Angular) — served by the backend from classpath:/static -FROM node:22-alpine AS web +FROM node:22-bookworm-slim AS web WORKDIR /web COPY frontend/package*.json ./ RUN npm install --no-audit --no-fund @@ -9,7 +11,7 @@ COPY frontend/ ./ RUN npx ng build --configuration=production # 2. Backend -FROM eclipse-temurin:21-jdk-alpine AS build +FROM eclipse-temurin:21-jdk AS build WORKDIR /app COPY gradlew settings.gradle ./ COPY gradle gradle @@ -19,9 +21,9 @@ COPY --from=web /web/dist/frontend/browser backend/src/main/resources/static RUN chmod +x gradlew && ./gradlew :backend:bootJar --no-daemon -x test # 3. Runtime: not root; data in /app/data (volume) -FROM eclipse-temurin:21-jre-alpine -# own user: "mail" already exists in Alpine (uid 8, group 12) — addgroup mail fails -RUN apk add --no-cache curl && addgroup -S -g 10001 app && adduser -S -u 10001 -G app app \ +FROM eclipse-temurin:21-jre +# Ubuntu image, curl included; own user: "mail" already exists (uid 8) +RUN groupadd -r -g 10001 app && useradd -r -u 10001 -g app -d /app -s /usr/sbin/nologin app \ && mkdir -p /app/data/attachments /app/data/dkim-keys && chown -R app:app /app/data WORKDIR /app COPY --from=build /app/backend/build/libs/*.jar app.jar -- 2.54.0