Skip to content
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

potential space savings in container images #1396

Open
jansmets opened this issue Oct 19, 2021 · 3 comments
Open

potential space savings in container images #1396

jansmets opened this issue Oct 19, 2021 · 3 comments

Comments

@jansmets
Copy link

I was poking a little bit around examining the container images

There is some image space to be recovered.

crunchy-pgbackrest:centos8-2.35-0 and crunchy-pgbouncer:centos8-1.15-3

0       039b8fa9e2e0d59e6b59b7ff051957259c2e765eeec90f751bf3910b61b52275/var/cache/dnf
59M     4d11a92edf5fb39a2a49982510fd8a92ea596668b9216f69ff283b1ca672b0e0/var/cache/dnf
8.0K    7f6caad864889f519dc3717be7e1eda74b2c1c296a0212fb88b338cd7bf4522f/var/cache/dnf
28K     da53e6c8e018ad4983b3e167f71b49ba0bae03780feeda0b4fe772b0c4c9ae9c/var/cache/dnf
11M     039b8fa9e2e0d59e6b59b7ff051957259c2e765eeec90f751bf3910b61b52275/var/lib/rpm
1.7M    4d11a92edf5fb39a2a49982510fd8a92ea596668b9216f69ff283b1ca672b0e0/var/lib/rpm
17M     7f6caad864889f519dc3717be7e1eda74b2c1c296a0212fb88b338cd7bf4522f/var/lib/rpm
17M     da53e6c8e018ad4983b3e167f71b49ba0bae03780feeda0b4fe772b0c4c9ae9c/var/lib/rpm
15M     efca8def04926359751e50f337a47939ac8e7964a0bb6d138b67e86d9fb3b3bc/var/lib/rpm
119M    total

Similar for crunchy-postgres:centos8-14.0-0

@jkatz
Copy link
Contributor

jkatz commented Nov 5, 2021

Hm...we're running dnf clean etc. pretty much after each install command, unless we missed some. Something worth looking into.

@jkatz
Copy link
Contributor

jkatz commented Nov 9, 2021

@jansmets How did you introspect this?

@jansmets
Copy link
Author

You can use docker export (or was it save, i always mix these up) to save the image, with all it's layers, to a tar file. If you then extract the tar it will give you subdirectories for each image layer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants