fix: build on debian slim instead of alpine

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 <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-04-21 11:47:23 +01:00
parent a07058d656
commit 9b4eaafd99
3 changed files with 7 additions and 8 deletions

View File

@@ -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

View File

@@ -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.

View File

@@ -6,7 +6,7 @@ import Button from '@/design-system/components/Button.vue'
<template>
<div class="min-h-screen bg-surface">
<Navbar variant="brand" layout="floating" :cart-count="0" />
<Navbar variant="brand" layout="standard" :cart-count="0" />
<section class="mx-auto max-w-4xl px-6 py-28 text-center">
<p class="eyebrow mb-4">Scaffolding</p>