Skip to content

Commit c41cf15

Browse files
committed
ci: fix dockerfile to finally build again with the new prisma version and distroless image
1 parent 0a390b9 commit c41cf15

1 file changed

Lines changed: 5 additions & 12 deletions

File tree

Dockerfile

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM oven/bun:alpine AS builder
1+
FROM oven/bun:alpine AS build
22
WORKDIR /app
33

44
RUN apk add --no-cache openssl
@@ -10,18 +10,11 @@ COPY . .
1010
RUN DATABASE_URL="postgresql://placeholder:placeholder@localhost:5432/placeholder" bunx prisma generate
1111
RUN bun run build
1212

13-
FROM alpine:3.19
13+
FROM gcr.io/distroless/nodejs22-debian12 AS runtime
1414
WORKDIR /app
1515

16-
RUN apk add --no-cache nodejs=~20 npm && \
17-
npm install -g prisma@latest --omit=dev && \
18-
rm -rf /var/cache/apk/* /tmp/* /var/tmp/* ~/.npm
16+
EXPOSE 3000
1917

20-
COPY --from=builder /app/node_modules/@prisma/client ./node_modules/@prisma/client
21-
COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma
22-
COPY --from=builder /app/prisma ./prisma
23-
COPY --from=builder /app/.output ./.output
18+
COPY --from=build /app /app
2419

25-
USER nobody
26-
EXPOSE 3000
27-
CMD ["sh", "-c", "prisma migrate deploy && node ./.output/server/index.mjs"]
20+
CMD [ ".output/server/index.mjs" ]

0 commit comments

Comments
 (0)