Skip to content

Dockerize multi stage#35

Open
soumitradev wants to merge 10 commits intocrux-bphc:masterfrom
soumitradev:dockerize-multi-stage
Open

Dockerize multi stage#35
soumitradev wants to merge 10 commits intocrux-bphc:masterfrom
soumitradev:dockerize-multi-stage

Conversation

@soumitradev
Copy link
Member

Make the docker build multi-stage

I'm new to this, so I need a review to see if this is the right way to do it.

@netlify
Copy link

netlify bot commented Jun 17, 2023

👷 Deploy request for chronofactorem pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 50eab34

@soumitradev soumitradev requested a review from pnicto June 17, 2023 00:29
Comment on lines +9 to +18
# Deploy stage
FROM node:17-bullseye-slim
WORKDIR /usr/src/app

COPY --chown=node:node . .
RUN rm -rf client
RUN mkdir -p client/build
COPY --from=chrono-build-stage --chown=node:node /usr/src/app/build /usr/src/app/client/build

RUN apt-get update && apt-get install -y --no-install-recommends dumb-init && apt-get clean && rm -rf /var/lib/apt/lists/*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think explicitly setting NODE_ENV again in the deploy stage would be a good idea. Everything else looks good.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do this, and I'll be optimizing it a little more (docker cache works really well with pnpm)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments