Command line to manage Docker image layers.
Requires:
- godep
- docker
go get -d github.com/rsampaio/docker-graphtool
cd $GOPATH/src/github.com/rsampaio/docker-graphtool
make
Usage:
dg mount [--options=<mount_options>] [<image>] [<dest>]
dg umount [--force] <temp_image>
dg bundle <image> <file.tar>
Example usage:
$ docker pull centos:7
$ dg mount centos:7 /tmp/centos
If you are in a systemd distro, like Arch:
$ systemd-nspawn -D /tmp/centos /bin/bash
# yum -y install systemd
# ^D
$ systemd-nspawn --boot -D /tmp/centos
...systemd init messages...
You can also export a bundle from a docker image:
$ docker pull ghost
$ dg bundle ghost ghost.tar
Run with runc:
$ mkdir -p ghost
$ tar -C ghost xvf ghost.tar
$ cd ghost
~/ghost $ runc start
/ #