Skip to content

Commit 0025b07

Browse files
committed
fix: Fix production docker image startup crash
1 parent 1613244 commit 0025b07

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
FROM oven/bun:1.3.12-alpine AS builder
1+
FROM oven/bun:1.3.12-alpine AS base
2+
3+
FROM base AS builder
24
WORKDIR /build
35
COPY package.json bun.lock ./
46
RUN bun install --frozen-lockfile
57
COPY . .
68
RUN bun run build
79

8-
FROM alpine:3.21
9-
RUN apk add --no-cache libstdc++ libgcc
10+
FROM base
1011
COPY --from=builder /build/.output/server server
1112
RUN adduser -D app
1213
USER app

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"check": "check",
88
"dev": "bun run --watch scripts/dev.ts",
9-
"build": "bun build src/main.ts --compile --minify --sourcemap --bytecode --outfile .output/server",
9+
"build": "bun build src/main.ts --compile --minify --sourcemap --outfile .output/server",
1010
"gen": "bun run gen:types",
1111
"gen:types": "bun run scripts/generate-types.ts",
1212
"docker:build": "docker build . -t aklinker1/store-api",

0 commit comments

Comments
 (0)