Skip to content

Latest commit

 

History

History
59 lines (44 loc) · 981 Bytes

README.md

File metadata and controls

59 lines (44 loc) · 981 Bytes

docker-graphtool

Command line to manage Docker image layers.

Install

Requires:

  • godep
  • docker
go get -d github.com/rsampaio/docker-graphtool
cd $GOPATH/src/github.com/rsampaio/docker-graphtool
make

Running

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
/ #