-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Delete build requirements in Dockerfiles #1199
Comments
The purpose of this change is to make the layers and the overall image size smaller. |
Hello @mathbunnyru & @davidspek, Thanks for this suggestion. However I'm wondering where to apply it. From the man page
So from my understanding, it can be used in conjonction with
So apt-get autoremove
# Reading package lists... Done
# Building dependency tree
# Reading state information... Done
# 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Did I miss something? Do you have some use cases in mind? Many thanks. |
You're right. https://github.com/jupyter/docker-stacks/blob/master/base-notebook/Dockerfile#L48 For example, we install But I think multi-stage build is a better solution for a given problem. I think further investigation needs to use https://github.com/wagoodman/dive to really tell, what are the pain points - the places / packages, which take a lot of space, but not needed in the resulting image. |
Hello @mathbunnyru, Ok got it. However I'm not sure in our case it's worth doing it for Best. |
As requested here as a comment to an open PR of mine, I am opening an issue regarding deleting build requirements from the docker images after they are not needed anymore. The line in question is:
Which is installed to add an apt key in the same
RUN
command and deleted after its use.The text was updated successfully, but these errors were encountered: