-
Notifications
You must be signed in to change notification settings - Fork 3.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
Docker Images got Big #3859
Comments
The I can't imagine that Alpine added 20MB to their base images, but the upgrade may change how our code compiles, or what dependencies we add during the build, and we might not be cleaning everything up. |
(You probably wanted to say alpine 3.5 vs 3.4 ^) I checked that, but even the https://hub.docker.com/r/osrm/osrm-backend-ci/tags/ I changed the Alpine version to 3.5 when integrating the Dockerfile into the osrm-backend repo. - nothing else changed, except the switch from Docker Hub to Docker Cloud. |
Ah - I bet it's the By using |
Ref: moby/moby#12169 |
But the osrm-backend-ci Dockerfile did exactly the same, check the PR https://github.com/Project-OSRM/osrm-backend/pull/3804/files#diff-3254677a7917c6c01f55212f86c57fbfR4 |
Hmm. We've unlinked the If I build locally, I get about a 50MB image from the I ran the images through https://github.com/goldmann/docker-squash and they shrink back down to:
This is a hint that my I'm not sure what the next action here is - AFAIK there's no easy way to run something like |
We're up to almost 200 MB in the latest release image https://hub.docker.com/r/osrm/osrm-backend/tags/ |
@daniel-j-h Is there way to bring down the size ? v5.7.4 was only ~52MB. What changed ? |
Check two commits above. Try building from the What changed is we're using Docker Cloud to automatically build docker images by now. And Docker Cloud does not squash: https://forums.docker.com/t/automatic-squash-for-docker-hub-builds/4148 |
Thanks @daniel-j-h. I will give it a try. |
In #4648 (comment) @danpat used the new multistage feature to reduce the Docker image size. We're now down to 9 MB for the latest tag which is quite impressive imho: https://hub.docker.com/r/osrm/osrm-backend/tags/ Closing this as resolved. |
Looks like our release images went up from ~10 MB to ~30 MB. Looks suspicious.
Could be related to #3850 - don't know why yet. cc @danpat
The text was updated successfully, but these errors were encountered: