buildah push with compression #5256
Answered
by
mtrmac
andrew-womeldorf
asked this question in
Q&A
-
I'm only somewhat familiar with buildah, so it's very possible I'm just doing something wrong. Want to check here before opening an issue. My desired outcome is to create a gzipped tar. However, the various sets of arguments I use don't seem to have any impact on the resulting filesize. $ podman -v
podman version 3.4.4
$ podman run --rm -it quay.io/containers/buildah:v1.33.2
[root@aca67de937a2 /]# buildah pull ubuntu
Resolved "ubuntu" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf)
Trying to pull docker.io/library/ubuntu:latest...
Getting image source signatures
Copying blob a48641193673 done |
Copying config 174c8c134b done |
Writing manifest to image destination
174c8c134b2a94b5bb0b37d9a2b6ba0663d82d23ebf62bd51f74a2fd457333da
[root@aca67de937a2 /]# buildah images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/library/ubuntu latest 174c8c134b2a 4 weeks ago 80.4 MB Using various flags with [root@aca67de937a2 /]# buildah push ubuntu docker-archive:image.tar
...
[root@aca67de937a2 /]# buildah push ubuntu docker-archive:image.tar.gz
...
[root@aca67de937a2 /]# buildah push --compression-format gzip ubuntu docker-archive:compression-format-gzip.tar.gz
...
[root@aca67de937a2 /]# buildah push --compression-format gzip --force-compression ubuntu docker-archive:force-compression.tar.gz
...
[root@aca67de937a2 /]# buildah push --disable-compression ubuntu docker-archive:disable-compression.tar
...
[root@aca67de937a2 /]# ls -lh | grep tar
-rw-r--r-- 1 root root 77M Jan 9 18:22 compression-format-gzip.tar.gz
-rw-r--r-- 1 root root 77M Jan 9 18:23 disable-compression.tar
-rw-r--r-- 1 root root 77M Jan 9 18:22 force-compression.tar.gz
-rw-r--r-- 1 root root 77M Jan 9 18:19 image.tar
-rw-r--r-- 1 root root 77M Jan 9 18:21 image.tar.gz I would expect at least one of these combinations of flags would result in a file with a differing size. |
Beta Was this translation helpful? Give feedback.
Answered by
mtrmac
Jan 15, 2024
Replies: 1 comment 2 replies
-
@mtrmac @vrothberg PTAL |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
None of those options affect the output format of
docker-archive
. (They would, in principle, affect the compression format inside the archive, except that docker-archive format never contains compressed layers.)Pipe it into a separate
gzip
stage if you want, by writing todocker-archive:/dev/stdout | gzip
perhaps.