smaller docker image
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -1,23 +1,13 @@
|
||||
FROM oven/bun AS builder
|
||||
|
||||
WORKDIR /app
|
||||
COPY package.json bun.lock ./
|
||||
|
||||
RUN bun install
|
||||
COPY . .
|
||||
|
||||
|
||||
RUN bun run build
|
||||
|
||||
|
||||
|
||||
FROM oven/bun
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app ./
|
||||
|
||||
COPY --from=builder /app/build ./build
|
||||
EXPOSE 3000
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
CMD ["bun", "build/index.js"]
|
||||
CMD ["bun", "build/index.js"]
|
||||
Reference in New Issue
Block a user