Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Dockerfile #952

Merged
merged 1 commit into from
Jan 15, 2025
Merged

Fix Dockerfile #952

merged 1 commit into from
Jan 15, 2025

Conversation

santib
Copy link
Member

@santib santib commented Jan 14, 2025

@@ -23,7 +23,7 @@ ENV NODE_ENV=production
FROM base AS builder

RUN apt-get update -qq && \
apt-get install -y build-essential libssl-dev libpq-dev git libsasl2-dev curl && \
apt-get install -y build-essential libssl-dev libpq-dev git libsasl2-dev libyaml-dev curl && \
Copy link
Member Author

Choose a reason for hiding this comment

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

not sure if it's needed in both places.

Also, what about Dockerfile.dev ?

Copy link
Contributor

Choose a reason for hiding this comment

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

This Dockerfile uses a Multi-stage build strategy.
The first part of this file creates a "builder" image that is only used for setting up the app dependencies, gems, assets precompilation, etc. And the final part is actually the "runtime" image.

If the library is needed for both build and runtime, we need to add it in both places. I think this change is correct 👍

Regarding the Dockerfile.dev, it does not implement multi-stage, but if it is a runtime dependency I think we should add it there as well

Copy link
Member Author

Choose a reason for hiding this comment

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

@santib santib closed this Jan 15, 2025
@santib santib reopened this Jan 15, 2025
@santib santib merged commit d1ec263 into main Jan 15, 2025
7 checks passed
@santib santib deleted the fix-dockerfile branch January 15, 2025 14:20
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