garmin / pyrex

Seamless container setup for developing with OpenEmbedded/Yocto Project
Apache License 2.0
36 stars 29 forks source link

image: Dockerfile: reduce image sizes #65

Closed QSchulz closed 1 year ago

QSchulz commented 3 years ago
$ podman image list
REPOSITORY                             TAG         IMAGE ID      CREATED            SIZE
localhost/14.04-oe                     latest      d104c67516fd  3 minutes ago      591 MB
localhost/16.04-oe                     latest      c8d0485857e4  9 minutes ago      837 MB
localhost/18.04-oe                     latest      79f37896e4c3  18 minutes ago     788 MB
localhost/20.04-oe                     latest      1558b8ec1e28  27 minutes ago     875 MB
docker.io/garminpyrex/ubuntu-14.04-oe  latest      8ea6ca2f1d58  2 months ago       667 MB
docker.io/garminpyrex/ubuntu-16.04-oe  latest      860319693cbd  2 months ago       897 MB
docker.io/garminpyrex/ubuntu-18.04-oe  latest      afd97f4ed060  2 months ago       866 MB
docker.io/garminpyrex/ubuntu-20.04-oe  latest      d4c71c6549f7  2 months ago       904 MB

14.04 is 12% smaller, 16.04 7%, 18.04 10% and 20.04 3%.

This was not tested (only built with: podman build -t 14.04-oe -f image/Dockerfile --build-arg PYREX_BASE=ubuntu-14.04-oe --target pyrex-oe).

QSchulz commented 3 years ago

If it breaks it's because they forgot to add the appropriate native dependencies in their recipes, in which case it is a good thing that it does. Also might highlight dependencies of Yocto that are missing in the docs.

Not sure exactly what's the issue with possibly breaking users? Am I missing something or do we just have a different opinion on the topic :)?

JoshuaWatt commented 3 years ago

Ya, I'm just leery of making a pyrex upgrade suddenly break someones build (even if it is due to a misconfiguration on their end). Smaller images are nice, but I'm not sure it's worth breaking someones existing workflow to do it. When we make a new image (Ubuntu 22.04 for example) that makes more sense since it's more of an opt-in thing to switch to that image.

QSchulz commented 3 years ago

Do you really want an MR for just a comment or do we just keep this one open as a reminder til we get to 22.04 :) ?

JoshuaWatt commented 3 years ago

Do you really want an MR for just a comment or do we just keep this one open as a reminder til we get to 22.04 :) ?

I have no preference.

JoshuaWatt commented 1 year ago

I believe this is taken care of in the new Ubuntu 22.04 in #81. Please check that and close this

QSchulz commented 1 year ago

Yup, the diff looks like what I'd have expected 🎉