From 9b4eaafd9905cac58eaa29efb4aaba1bf658cde3 Mon Sep 17 00:00:00 2001 From: Dorian Date: Tue, 21 Apr 2026 11:47:23 +0100 Subject: [PATCH] fix: build on debian slim instead of alpine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Alpine + libc6-compat still lost the fight with Tailwind v4's prebuilt oxide / lightningcss / rolldown bindings on the Portainer host. Debian slim (glibc-native) is the known-good base for this stack. The serve stage stays nginx:alpine, so the deployed image size is unchanged — only the discarded build stage grew. Also flip the home-page navbar from floating to the standard layout. Co-Authored-By: Claude Opus 4.7 --- Dockerfile | 11 +++++------ README.md | 2 +- src/pages/HomePage.vue | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 93963fd..305a158 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,14 +3,13 @@ # Pinned tags only — no :latest, no floating minors. # ── 1. Build ─────────────────────────────────────────────────────────────── -FROM node:24.15.0-alpine3.23 AS build +# Debian slim (glibc) for the build stage. Alpine/musl works in theory with +# libc6-compat, but Tailwind v4 oxide + lightningcss + rolldown prebuilt +# .node bindings keep finding new ways to fail there. Debian slim is the +# known-good path and the build stage is thrown away after COPY --from. +FROM node:24.15.0-bookworm-slim AS build WORKDIR /app -# libc6-compat: the prebuilt @tailwindcss/oxide and lightningcss .node bindings -# are linked against a glibc-compatible runtime and fail to load on bare Alpine -# musl otherwise — which kills `npm ci` during its postinstall probe. -RUN apk add --no-cache libc6-compat - # Copy lockfile first so `npm ci` layer caches when only source changes. COPY package.json package-lock.json ./ RUN npm ci --no-audit --no-fund diff --git a/README.md b/README.md index c915af1..e7ef1c7 100644 --- a/README.md +++ b/README.md @@ -36,4 +36,4 @@ Portainer builds the image from the `Dockerfile` at the repo root each time the 3. Deploy. The site comes up on host port **5555** (internal container port 80). 4. Health: `GET /health` returns `200 ok`. -Pinned images: `node:24.15.0-alpine3.23` (build stage), `nginx:1.27.3-alpine` (serve stage). Bump explicitly when you want to upgrade — no floating tags. +Pinned images: `node:24.15.0-bookworm-slim` (build stage, glibc — Alpine/musl fights with Tailwind v4's native bindings), `nginx:1.27.3-alpine` (serve stage). Bump explicitly when you want to upgrade — no floating tags. diff --git a/src/pages/HomePage.vue b/src/pages/HomePage.vue index d4d812b..0f77362 100644 --- a/src/pages/HomePage.vue +++ b/src/pages/HomePage.vue @@ -6,7 +6,7 @@ import Button from '@/design-system/components/Button.vue'