conda-incubator / conda-store

Data science environments, for collaboration. ✨
https://conda.store
BSD 3-Clause "New" or "Revised" License
143 stars 46 forks source link

Dcmcand optimize docker files #625

Closed dcmcand closed 11 months ago

dcmcand commented 11 months ago

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:

Pull request checklist

Additional information

netlify[bot] commented 11 months ago

Deploy Preview for kaleidoscopic-dango-0cf31d canceled.

Name Link
Latest commit de5de83268f37c2e762cb8970dd5f13318c4761f
Latest deploy log https://app.netlify.com/sites/kaleidoscopic-dango-0cf31d/deploys/652fdc30e7be500008d186c9
dcmcand commented 11 months ago

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.

nkaretnikov commented 11 months ago

FYI: integration test failure is unrelated, I'm investigating: https://github.com/conda-incubator/conda-store/issues/632