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

Dcmcand optimize docker files #625

Merged
merged 24 commits into from
Oct 18, 2023
Merged

Dcmcand optimize docker files #625

merged 24 commits into from
Oct 18, 2023

Conversation

dcmcand
Copy link
Contributor

@dcmcand dcmcand commented Oct 17, 2023

Follow on to #621 that should be merged before this is reviewed

Description

This PR optimizes the Docker files for the conda-store and conda-store-server images.

Currently the conda-store image is 1.54GB. This PR reduces that to 890MB by using multistage builds. This is a reduction of 43%.

The current conda-store-server image is 1.96GB. This PR reduces that to 1.24GB, a reduction of 37%.

ChatGPT

Smaller Docker images offer faster container deployment, reduced storage and bandwidth costs, and enhanced security by minimizing potential attack surfaces.

This pull request:

  • Utilizes multistage builds to reduce the size of images
  • Uses caches to speed the dev workflow and make rebuilding containers faster
  • Removes unneeded files from images.

Pull request checklist

  • Did you test this change locally?
  • Did you update the documentation (if required)?
  • Did you add/update relevant tests for this change (if required)?

Additional information

@netlify
Copy link

netlify bot commented Oct 17, 2023

Deploy Preview for kaleidoscopic-dango-0cf31d canceled.

Name Link
🔨 Latest commit de5de83
🔍 Latest deploy log https://app.netlify.com/sites/kaleidoscopic-dango-0cf31d/deploys/652fdc30e7be500008d186c9

Copy link
Collaborator

@trallard trallard left a comment

Choose a reason for hiding this comment

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

Neat I love some image optimisation 🎉 It seems now that we are duplicating some bits in the build_docker_image.yaml and the release.yaml to keep these aligned and reduce duplication. Shall we move these tidbits into a reusable action and call it from the workflows instead?

conda-store-server/Dockerfile Outdated Show resolved Hide resolved
conda-store-server/Dockerfile Outdated Show resolved Hide resolved
conda-store-server/Dockerfile Outdated Show resolved Hide resolved
conda-store/Dockerfile Outdated Show resolved Hide resolved
@dcmcand
Copy link
Contributor Author

dcmcand commented Oct 17, 2023

Neat I love some image optimisation 🎉 It seems now that we are duplicating some bits in the build_docker_image.yaml and the release.yaml to keep these aligned and reduce duplication. Shall we move these tidbits into a reusable action and call it from the workflows instead?

I think that makes sense. I will make another issue I made #629 and will do it in a separate PR.

@dcmcand dcmcand marked this pull request as ready for review October 17, 2023 18:50
dcmcand and others added 2 commits October 17, 2023 14:53
@dcmcand dcmcand requested a review from trallard October 17, 2023 19:19
@nkaretnikov
Copy link
Contributor

FYI: integration test failure is unrelated, I'm investigating: #632

Copy link
Collaborator

@trallard trallard left a comment

Choose a reason for hiding this comment

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

This looks good so will go ahead and merge and we can see how these changes look with the release candidate tomorrow 🤞🏽
Thanks @dcmcand

@trallard trallard merged commit 91d2cb4 into main Oct 18, 2023
15 of 16 checks passed
@trallard trallard deleted the dcmcand-optimize-docker-files branch October 18, 2023 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done 💪🏾
Development

Successfully merging this pull request may close these issues.

3 participants