-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Docker: Remove dist-upgrade #10822
Docker: Remove dist-upgrade #10822
Conversation
Just my humble opinion, but updating existent package aren't increasing the size by much (worst case a few kilobytes), don't take much time, and provide latest upstream security fixes. |
Well, wrong. It increases the image by the package size which best case is 1MB and worst case hundreds of MBs. Docker updates every file apt update touches and puts them in a new layer.
Well, no. If you care that much about up to date run Arch and bare metal not docker. If you're objective is to get this damn image to 2 GB you are on the best track. 1.4GB is already way to much for a docker image. |
It's not having bleeding edge stuff, it's having less security issue, docker is already a nightmare security-wise so it's quite important to do our best to have the very latest fixes. Also please try to stay courteous, we aren't here to attack each others. |
Most docker container that are well build are way more up do date then the typical Ubuntu or Debian machine. Also you give an potential attacker way less attack surface out of the box and don't allow him to sneak into all production databases when he finds one rce. So it is more secure if you know what you are doing like always.
It took bloody 47 minutes in circleci.....
If there is an important security update it can always be installed via
Doesn't hurt. Speeds up my dev cycle.
Please don't suggest anti patterns then. Also apt-upgrade produces unpredictable builds and you can't reproduce an image in the future locally without pulling all updates. Good luck debugging a package issue with that. |
problem solved. |
@Shleeble good joke. One of the most request features that one if the maintainers simply does not want to implement. |
I know this is thread is dead but @SuperSandro2000
Is because the default docker build system is trash see these for what you can do using this dockerfile
See --squash
That's because it builds nodejs, ruby, jemalloc, mastodon then finally compiles assets not from updates this was a choice made when this new dockerfile was added see here for an example of the faster building version |
The docker build system is not trash this just uses it wrong. I don't wanna use squash. Why even compile nodejs and jemalloc? Why not use preconpiled versions? |
What's wrong with squash?
Allows masto to use any version at any time and this way the docker image dosn't depend on too many other images 😄 |
You know apt? It can install all those things and it saves us time updating those things and debugging build failures and build time and complexity. And squash is not the ideal way to do something proper. |
Build caching for local/dev servers, then who cares how long it takes to build the release version
You build it in the container so you have version control even the slightly older version here it closer to current version then the version 18.04 is running src src2
It shrinks image sizes massively why would you not build your release version using it |
I still care about build time when I need to develop that stuff. If it is not necessary we don't need to do it. We don't really gain anything except more complexity and work and I would like to keep it simple and understandable. If you want full control over everything feel safe to compile everything from source but I simply don't have the time and debugging that is required for that. I am not referring to the version in Ubuntu. I am referring to the the official node binary releases for Ubuntu. Same thing with Ruby and python. We can combine layers where it makes sense in the dockerfile. This makes the docker file 100% comparable to the final image and makes debugging easier. It also does not add unnecessary CI complexity that could fail. |
Upgrading all packages is an anti pattern in docker. If there is no special reason to do that you should not do it. If any specific package is required to be update that individual package should be targeted.
The problem with that is that we potentially update many packages that increase the image size drastically and the end users needs to download more then necessary.