Skip to content

Commit

Permalink
fix: moved the final bundle files to the final distro user folder
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNaubit committed Jul 1, 2024
1 parent 03512ce commit c18258f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ RUN bun run build:prod
FROM oven/bun:distroless

# Copy the compiled standalone file from the builder stage
COPY --from=builder --chown=nonroot:nonroot /home/bun/app/node_modules /node_modules
COPY --from=builder --chown=nonroot:nonroot /home/bun/app/dist /dist
COPY --from=builder --chown=nonroot:nonroot /home/bun/app/node_modules /home/nonroot/app/node_modules
COPY --from=builder --chown=nonroot:nonroot /home/bun/app/dist /home/nonroot/app/dist

ENV NODE_ENV="production"

Expand All @@ -27,4 +27,4 @@ USER nonroot
# Set the entrypoint to the compiled standalone file
EXPOSE 3000
ENTRYPOINT ["bun"]
CMD ["/dist/index.js"]
CMD ["/home/nonroot/app/dist/index.js"]

0 comments on commit c18258f

Please sign in to comment.