-
-
Save dirkakrid/1aadf95005327a9fcd16271770c94cfc to your computer and use it in GitHub Desktop.
tar docker image (squash)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker_root=/var/lib/docker/btrfs | |
subvolumes=subvolumes | |
docker_image=aputs/archlinux | |
tar_file=/tmp/image.tar.gz | |
# tar | |
cd $docker_root/$subvolumes/$(docker inspect --format='{{.Id}}' $docker_image) | |
tar --exclude={'.','..'} -Pcvzf $tar_file .* * |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment