fix(docker): COPY public/ into builder stage #3

Merged
janpeter merged 1 commit from fix/dockerfile-copy-public into main 2026-05-26 21:07:50 +02:00
Owner

Summary

Derde Mac-side fix voor M16 fase 1 task 16 build-chain. Runner-stage doet COPY --from=builder /app/public ./public maar builder enumeerde COPY-paths zonder public/ mee te nemen.

Resultaat tijdens server-Docker-build:

#24 [runner 4/7] COPY --from=builder /app/public ./public
#24 ERROR: ... "/app/public": not found

Root cause

  • public/.gitkeep IS getrackt in git (commit b2aa858) → dir bestaat in source tree
  • Dockerfile builder-stage gebruikt expliciete COPY-enumeratie (COPY app ./app, COPY lib ./lib, etc.) ipv COPY . . — beste-practice voor cache-stability, maar public/ zat niet in de lijst
  • Builder image had dus geen /app/public → runner-stage COPY-from-builder kon niets vinden

Fix

Eén nieuwe COPY-regel in builder stage:

COPY app ./app
COPY lib ./lib
COPY proxy.ts ./
COPY public ./public   <-- nieuw

Test plan

Server-Claude retry na merge:

cd /srv/scrum4me/repos/scrum4me-workers && git pull --ff-only
cd /srv/scrum4me/compose && docker compose build scrum4me-workers

Verwacht: build slaagt door alle stages inclusief runner.

Context

Fix #3 van 3 voor task 16 build-chain:

  • PR #1 gemerged — mkdir -p prisma + prisma/.gitkeep
  • PR #2 gemerged — SKIP_ENV_VALIDATION in lib/env.ts
  • ⏸ THIS — COPY public ./public in builder

All three were originally caused by .gitignore / explicit-COPY interactions that only surface in fresh Docker build context, not local dev (where mkdir -p-side-effects already had created the dirs).

## Summary Derde Mac-side fix voor M16 fase 1 task 16 build-chain. Runner-stage doet `COPY --from=builder /app/public ./public` maar builder enumeerde `COPY`-paths zonder `public/` mee te nemen. Resultaat tijdens server-Docker-build: ``` #24 [runner 4/7] COPY --from=builder /app/public ./public #24 ERROR: ... "/app/public": not found ``` ## Root cause - `public/.gitkeep` IS getrackt in git (commit `b2aa858`) → dir bestaat in source tree - Dockerfile builder-stage gebruikt expliciete COPY-enumeratie (`COPY app ./app`, `COPY lib ./lib`, etc.) ipv `COPY . .` — beste-practice voor cache-stability, maar `public/` zat niet in de lijst - Builder image had dus geen `/app/public` → runner-stage COPY-from-builder kon niets vinden ## Fix Eén nieuwe COPY-regel in builder stage: ```dockerfile COPY app ./app COPY lib ./lib COPY proxy.ts ./ COPY public ./public <-- nieuw ``` ## Test plan Server-Claude retry na merge: ```bash cd /srv/scrum4me/repos/scrum4me-workers && git pull --ff-only cd /srv/scrum4me/compose && docker compose build scrum4me-workers ``` Verwacht: build slaagt door alle stages inclusief runner. ## Context Fix #3 van 3 voor task 16 build-chain: - ✅ PR #1 gemerged — `mkdir -p prisma` + `prisma/.gitkeep` - ✅ PR #2 gemerged — `SKIP_ENV_VALIDATION` in `lib/env.ts` - ⏸ THIS — `COPY public ./public` in builder All three were originally caused by `.gitignore` / explicit-COPY interactions that only surface in fresh Docker build context, not local dev (where `mkdir -p`-side-effects already had created the dirs).
The runner stage does `COPY --from=builder /app/public ./public` but the
builder stage never copied `public/` from the build context, so `/app/public`
doesn't exist in the builder image. Build fails at runner-stage COPY:

  ERROR: failed to calculate checksum of ref ...
  "/app/public": not found

`public/.gitkeep` is committed (so the dir exists in the source tree), but
the Dockerfile's builder stage explicitly enumerates COPY paths and didn't
include `public/`. Adding the COPY line.

Third Mac-side fix for M16 fase 1 task 16 build chain:
1. PR #1 — `mkdir -p prisma` + `prisma/.gitkeep` (gitignored dir)
2. PR #2 — `SKIP_ENV_VALIDATION` in `lib/env.ts` (build-time module-load)
3. THIS — `COPY public ./public` in builder stage (runner expects it)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
janpeter/scrum4me-workers!3
No description provided.