-
Notifications
You must be signed in to change notification settings - Fork 764
[anaconda] Refactor Dockerfile to decrease image size
#692
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
Merged
samruddhikhandale
merged 10 commits into
devcontainers:main
from
alexander-smolyakov:anaconda_refactor-dockerfile-decrease-image-size
Aug 8, 2023
Merged
[anaconda] Refactor Dockerfile to decrease image size
#692
samruddhikhandale
merged 10 commits into
devcontainers:main
from
alexander-smolyakov:anaconda_refactor-dockerfile-decrease-image-size
Aug 8, 2023
Conversation
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
samruddhikhandale
requested changes
Aug 2, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look great, thank you! 🎉
Merged
1 task
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.