You are spot on. The > 200MB size comes from yum.
I remember that I also tested with just "touch test" back when I started using
podman few months ago and each new layer has a size bigger than the previous one.
I think it is somehow fixed now.
Is there a way to optimise and merge all the layers in an image into one layer without
having to use the build command and Dockerfile?
From: Gordon Messmer <gordon.messmer(a)gmail.com>
Sent: Thursday, 7 May 2020 1:35 PM
To: podman(a)lists.podman.io <podman(a)lists.podman.io>
Subject: [Podman] Re: Podman build and commit does not seem to use overlayfs
On 5/5/20 11:23 PM, Alvin Sebastian wrote:
I run podman as root, but it seems that the build and commit
always create images that double the size on every change.
# podman run -it centos7-systemd /bin/bash
# yum update
# podman commit inspiring_ganguly inspiring_ganguly
# podman image tree inspiring_ganguly
Image ID: feb029dfb122
├── ID: 913cda0bf08e Size: 227.7MB Top Layer of:
└── ID: 3ff0a6be06fa Size: 208.7MB Top Layer of:
It's hard to say if what you're seeing is doubling the size on "every
change", because "yum update" can easily create large layers. Both
because it may apply updates, and because it will leave a fairly large
cache in /var/cache/yum if you don't also "yum clean all" before you
Could you try a simpler change? I don't see the behavior you're seeing
here. I'm not using F2FS, but I don't see a reason to think the FS is
$ podman run -it centos:8 /bin/bash
[root@d8a5cbded76a /]# touch test
[root@d8a5cbded76a /]# exit
$ podman commit objective_torvalds objective_torvalds
$ podman image tree objective_torvalds
Image ID: 5cf4ca3ac6fa
├── ID: aff9833d4641 Size: 227.6MB Top Layer of:
└── ID: 1288ae30095b Size: 4.608kB Top Layer of:
Podman mailing list -- podman(a)lists.podman.io
To unsubscribe send an email to podman-leave(a)lists.podman.io