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

Feat/37 client docker file #115

Merged
merged 5 commits into from
Jan 30, 2024
Merged

Feat/37 client docker file #115

merged 5 commits into from
Jan 30, 2024

Conversation

pbastia
Copy link
Contributor

@pbastia pbastia commented Jan 30, 2024

No description provided.

@pbastia pbastia force-pushed the feat/37-client-docker-file branch 5 times, most recently from f3f930e to 7b11d60 Compare January 30, 2024 19:10
@pbastia pbastia force-pushed the feat/37-client-docker-file branch from 7b11d60 to cdeb46e Compare January 30, 2024 19:14
@pbastia pbastia marked this pull request as ready for review January 30, 2024 19:19

RUN yarn install --frozen-lockfile --production=false && \
yarn build && \
yarn install --frozen-lockfile --production=true && \

Choose a reason for hiding this comment

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

What is the reasoning behind running yarn install with production set to false, and then to true?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was kind of wondering the same, it's setup the same way in the registration app.
I'm assuming it's to ensure the development build works as well? Maybe @dleard or @andrea-williams has context to give us

Choose a reason for hiding this comment

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

Unless their docs are off, the only difference is that with production=false our dev dependencies will be installed. In that case the second install won't do anything. If we need something from our dev dependencies for the build to happen well, we could consider removing the node_modules after the yarn build and then running the install in production mode.

Definitely not a huge deal, I was just curious.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd say - let's remove the whole dev statement. There is no need to ship a production image with dev dependencies, this might increase the attack surface if those deps have vulnerabilities?

Choose a reason for hiding this comment

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

I agree, and if nothing else we'll shrink our image a little bit, which feels like a win win to me!

Choose a reason for hiding this comment

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

I'm afraid I have no insight into why the Dockerfile is written that way. It's a question for either Dylan or @Sepehr-Sobhani

Copy link
Contributor

Choose a reason for hiding this comment

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

This seems to be a leftover from copying and pasting the Dockerfile from CIF.

Copy link

@mikevespi mikevespi left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@pbastia pbastia merged commit 3b88f2d into develop Jan 30, 2024
1 check passed
@pbastia pbastia deleted the feat/37-client-docker-file branch January 30, 2024 23:35
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.

4 participants