From 699000c63da8e8c0eb769d11aa0189f03b81f6b0 Mon Sep 17 00:00:00 2001 From: mAi Date: Tue, 5 May 2026 11:37:36 +0200 Subject: [PATCH] Dockerfile: oven/bun:latest, root-run (avoids alpine UID 1000 collision) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mirrors msbls.de pattern, simplified (no mbrian-core submodule clone). UID note: oven/bun:1-alpine has a built-in 'bun' user at UID/GID 1000 and `addgroup -u 1000` on top of it breaks the build silently. mExDraw#14 (commit fc62b9c) lost ~4 weeks of Dokploy deploys to that. Comment in the Dockerfile so the next person doesn't trip over the same. Production build verified locally: vite build ✓ (4.08s). --- Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9baaa3a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM oven/bun:latest +WORKDIR /app + +# Note: oven/bun:1-alpine ships a pre-existing `bun` user/group at UID/GID +# 1000. We use the non-alpine image (`oven/bun:latest`, root-owned) here to +# avoid the collision documented in m/mExDraw fc62b9c. If you ever swap to +# the -alpine variant, run as the bundled `bun` user — do NOT addgroup -u 1000. + +COPY package.json bun.lock* ./ +RUN bun install --frozen-lockfile || bun install + +COPY . . +RUN bun run build + +ENV HOST=0.0.0.0 PORT=3000 +EXPOSE 3000 +CMD ["bun", "./build/index.js"]