You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Skip tarball generation for layers when building a container image
#7060
I'm using buildah to build large (20GB) images, I'm not interested in pushing the image to a registry because I'm using it to build a squashfs image from the contents.
I like the intermediate layers when building an image which allow me to restart at a failing step (skipping all steps that completed successfully).
But as the image increases in size during build, the layers grow as well and a tarball is generated for every layer in $TMPDIR which requires a lot of disk space, wasted time and wear on my SSD.
Currently I'm working around this by using a shell script instead of a Containerfile which uses the following shell script:
#!/bin/bashset -eux
SRC=$1
DST=$2
buildah from --name=$DST scratch
buildah unshare <<@EOFset -euSRC_MOUNT=\$(buildah mount $SRC)DST_MOUNT=\$(buildah mount $DST)shopt -s dotglob cp --reflink=always -rp \${SRC_MOUNT}/* \${DST_MOUNT}/@EOF
To create a reflinked clone of a buildah container. But this only works on btrfs (and zfs?).
This leads me to two questions:
Would it be possible to disable this tarball generation when using a Containerfile, with the side note that the generated image cannot be pushed?
Would it be a good idea to add a buildah clone command for this? There's already podman clone but that creates a new container from the source image discarding all changes from the source container.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
I'm using buildah to build large (20GB) images, I'm not interested in pushing the image to a registry because I'm using it to build a squashfs image from the contents.
I like the intermediate layers when building an image which allow me to restart at a failing step (skipping all steps that completed successfully).
But as the image increases in size during build, the layers grow as well and a tarball is generated for every layer in $TMPDIR which requires a lot of disk space, wasted time and wear on my SSD.
Currently I'm working around this by using a shell script instead of a Containerfile which uses the following shell script:
To create a reflinked clone of a buildah container. But this only works on btrfs (and zfs?).
This leads me to two questions:
buildah clonecommand for this? There's alreadypodman clonebut that creates a new container from the source image discarding all changes from the source container.All reactions