-
Couldn't load subscription status.
- Fork 788
[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
[anaconda] Refactor Dockerfile to decrease image size
#692
Conversation
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
Co-authored-by: Samruddhi Khandale <samruddhikhandale@github.com>
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! 🎉
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.