Last active
October 29, 2016 23:58
-
-
Save aputs/1e2d58b507de37d7bae1 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