impr: update bun adapters/versions in docker

This commit is contained in:
James Xylight committed 2025-06-03 17:25:41 -07:00
1 parent 5457c78320
commit 692e0abd7a
3 files changed
+21 -18

No files matched your search

+11 -12
View File
@@ -4,8 +4,7 @@ WORKDIR /app
COPY package.json .
# Bun stage
FROM oven/bun:1 AS bun-builder
USER bun
FROM oven/bun:1.2.9-alpine AS bun-builder
WORKDIR /app
COPY --from=base /app/package.json .
COPY . .
@@ -20,15 +19,6 @@ COPY . .
RUN npm install --no-lockfile
RUN ADAPTER=node npm run build
# Final Bun image
FROM oven/bun:1-alpine AS bun
WORKDIR /app
COPY --from=bun-builder /app/build /app/build
COPY --from=bun-builder /app/node_modules /app/node_modules
EXPOSE 3000
USER bun
CMD ["bun", "build/index.js"]
# Final Node.js image
FROM node:20-alpine AS node
USER node
@@ -37,4 +27,13 @@ COPY --from=node-builder /app/build /app/build
COPY --from=node-builder /app/node_modules /app/node_modules
COPY --from=node-builder /app/package.json /app/package.json
EXPOSE 3000
CMD ["node", "build/index.js"]
CMD ["node", "build/index.js"]
# Final Bun image
FROM oven/bun:1.2.9-alpine AS bun
WORKDIR /app
COPY --from=bun-builder /app/build /app/build
COPY --from=bun-builder /app/node_modules /app/node_modules
EXPOSE 3000
USER bun
CMD ["bun", "build/index.js"]