Skip to content

Instantly share code, notes, and snippets.

@aputs
Created November 7, 2014 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aputs/0476fd313a86c66a6927 to your computer and use it in GitHub Desktop.
Save aputs/0476fd313a86c66a6927 to your computer and use it in GitHub Desktop.
run systemd-nspawn on btrfs docker image snapshot
docker_root=/var/lib/docker/btrfs
subvolumes=subvolumes
docker_image=aputs/archlinux
tar_file=/tmp/image.tar.gz
dest_dir=/var/lib/container/archlinux
btrfs subvolume snapshot $docker_root/$subvolumes/$(docker inspect --format='{{.Id}}' $docker_image) $dest_dir
systemd-nspawn -D $dest_dir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment