DevHeads.net

Fedora Container base image is getting smaller

Hi all,

The Container SIG has been busy in the last few weeks working on
getting the Fedora container base image smaller (It was growing over
300MB). While a few minor changes [0-1] have recently landed in the
fedora:latest and fedora:rawhide images.

Last couple days a bigger change [2] have been introduced in the
fedora:rawhide image. This change drops all the weak dependencies from
the base image which allowed us to have a smaller base image (215MB).

Currently the plan is to keep this change in fedora:rawhide and wait
for Fedora 31 GA to propagate to the change to the fedora:latest
image. If you are currently using the fedora:latest image I would
encourage you to give a try using
registry.fedoraproject.org/fedora:rawhide as a base image since you
might need to adjust your Dockerfile if you were depending on some of
the weak dependencies.

If you think that a package should be added or removed from the base
image please file a ticket to the Container SIG tracker [3].

Also if you are interested to help improve the Fedora Container base
image in general you can join the Container SIG [4].

Thanks and Happy Containerization,
Clément

[0] - <a href="https://pagure.io/fedora-kickstarts/pull-request/535" title="https://pagure.io/fedora-kickstarts/pull-request/535">https://pagure.io/fedora-kickstarts/pull-request/535</a>
[1] - <a href="https://pagure.io/fedora-kickstarts/pull-request/536" title="https://pagure.io/fedora-kickstarts/pull-request/536">https://pagure.io/fedora-kickstarts/pull-request/536</a>
[2] - <a href="https://pagure.io/fedora-kickstarts/pull-request/551" title="https://pagure.io/fedora-kickstarts/pull-request/551">https://pagure.io/fedora-kickstarts/pull-request/551</a>
[3] - <a href="https://teams.fedoraproject.org/project/cverna-container-sig/issues" title="https://teams.fedoraproject.org/project/cverna-container-sig/issues">https://teams.fedoraproject.org/project/cverna-container-sig/issues</a>
[4] - <a href="https://teams.fedoraproject.org/project/cverna-container-sig/wiki/home" title="https://teams.fedoraproject.org/project/cverna-container-sig/wiki/home">https://teams.fedoraproject.org/project/cverna-container-sig/wiki/home</a>

Comments

Re: Fedora Container base image is getting smaller

By Matthew Miller at 07/24/2019 - 10:10

On Wed, Jul 24, 2019 at 07:09:24AM +0200, Clement Verna wrote:
This makes me happy. Is that compressed (transfer) size or size on disk?
What are the biggest things remaining? I'd love to get it into
double-digits.

Re: Fedora Container base image is getting smaller

By Clement Verna at 07/24/2019 - 14:05

On Wed, 24 Jul 2019 at 16:58, Matthew Miller < ... at fedoraproject dot org> wrote:
This is the size on the disk, the compressed size is around 70MB.

WIthout looking in to too much details, I would say the next big thing
we have is python3 (~50MB) that we need because of dnf. I think there
are still a few things that we can improve for example we have 7.4 MB
of timezone info and we have around 5 MB for the dejavu font which I
don't think are needed in the container context :-)

We have the fedora-minimal image that is using microdnf (no python
needed) which is 136 MB (40MB compressed) big.

Re: Fedora Container base image is getting smaller

By Vitaly Zaitsev ... at 07/24/2019 - 14:45

Le mercredi 24 juillet 2019 à 20:05 +0200, Clement Verna a écrit :
Yes, DejaVu is only in the minimal install, because some users could
not be bothered to select the fonts group when they needed a system
with fonts, and pestered maintainers till a font was added to the
default install (and DejaVu Sans is good value for that, because it
provides a large coverage, in a single font, taking less space than
many smaller fonts with coverage overlaps)

Regards,