-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Combine apt-get in final docker image and remove cache #221
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
Conversation
The two The apt-get package list removal looks reasonable to me. |
Combined it is readable too and there is already a comment. Don't think we need to keep it seperated. If we don't combine it the cache removal is totally useless as we download all the data with the first layer and then remove it in the next layer. This means if we don't combine the apts we would make the image overall worse. And personally I use Alpine for every image because it is so damn small and keeps my hard drive empty. I am currently doing them myself and maybe going to contribute them if they work good. |
Readability is subjective. I understand you think its readable but imo it is harder. Also, there is no comment.
That is true, but I think that's ok. The package cache is very small. I favour the readability of separate runs. Thank you for the contribution but for the above reasons, I cannot merge it. |
Well then I do my own like always. People just can't make nice small docker images. |
@nhooyr Isn't it recommended to combine |
Yes, this PR is good at least because we want to couple the |
@coderasher oh thanks man! ❤️ I should get a printer and hang that on my wall. |
Yes, but that would mean we add a
We don't have to combine the RUNs to do that. |
I am glad you didn't do that cause that would be kinda stupid. |
@SuperSandro2000 Look man, we're all just trying to make code-server better. Can you please be a little more respectful? I don't see why it would have been stupid. It would have been fine either way. |
English is not my first language so it is a bit hard for me. I didn't mean it in an offensive way or so. We would basically run the same command twice. I don't understand why you don't like the idea of just merging the two lines. Readability is just fine. |
Understood. It's all good. |
Describe in detail the problem you had and how this PR fixes it
I had no problem but this reduces the amount of layers needed to download and removes the apt-get cache to reduce the image size
Is there an open issue you can link to?
nop