[anaconda] Refactor Dockerfile to decrease image size#692
Merged
samruddhikhandale merged 10 commits intodevcontainers:mainfrom Aug 8, 2023
alexander-smolyakov:anaconda_refactor-dockerfile-decrease-image-size
Merged
[anaconda] Refactor Dockerfile to decrease image size#692samruddhikhandale merged 10 commits intodevcontainers:mainfrom alexander-smolyakov:anaconda_refactor-dockerfile-decrease-image-size
Dockerfile to decrease image size#692samruddhikhandale merged 10 commits intodevcontainers:mainfrom
alexander-smolyakov:anaconda_refactor-dockerfile-decrease-image-size
Conversation
samruddhikhandale
requested changes
Aug 2, 2023
Member
samruddhikhandale
left a comment
There was a problem hiding this comment.
It is super cool to see the image size decrease from ~9 GB to ~5 GB 🎉 ✨
Thank you!
Left some comments!
- Bump `base` devcontainer version - Update permissions
Dockerfile to decrease image sizeDockerfile to decrease image size
samruddhikhandale
previously approved these changes
Aug 3, 2023
Co-authored-by: Samruddhi Khandale <samruddhikhandale@github.com>
samruddhikhandale
approved these changes
Aug 8, 2023
Member
samruddhikhandale
left a comment
There was a problem hiding this comment.
Look great, thank you! 🎉
Merged
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
During patch development, the CI checks for the
anacondadevcontainer started to fail due to the space limit on a hosted agent.After investigation, it turned out that layer where we set up ownership and permission for the
optfolder consumes a lot of space. This is related to using ofchownandchmodcommands.Related code:
images/src/anaconda/.devcontainer/Dockerfile
Lines 88 to 92 in 47bbd23
Fix:
To fix this and reduce image size, the Docker file was refactored:
The
pip installandconda installcommands now executes against thecontinuumio/anaconda3image. This will allow us to not worry aboutoptfolder permissions and ownership since we can set them up duringCOPYinstruction;The
COPYinstruction now sets up permissions and ownership for theoptfolder. TheCOPYinstruction will not create an additional layer, which should help decrease image size;Previous commands for setting up permissions and ownership were removed.