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:
11
Dockerfile
11
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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user