A tool to convert docker inspect to the opencontainers runc spec.

Clone this repo:
  1. 417bb3d Sometimes the field "c.HostConfig.Resources.MemorySwappiness" is nil. (#20) by Lifubang · 13 days ago master
  2. 6148709 Bump version to v0.6.2 by Jess Frazelle · 9 weeks ago v0.6.2
  3. a86aac4 update cli pkg by Jess Frazelle · 9 weeks ago
  4. 1fdb9b1 update generated project files by Jess Frazelle · 9 weeks ago
  5. eb5bf13 Bump version to v0.6.1 by Jess Frazelle · 10 weeks ago v0.6.1


Travis CI GoDoc Github All Releases

A tool to convert docker inspect to the opencontainers/specs and opencontainers/runc.


This project is no longer maintained. If you are using a version of docker greater than 1.11 then you can just copy the config from /var/run/docker/libcontainerd like so:

$ docker ps -a
CONTAINER ID    CREATED             STATUS              PORTS               NAMES
d4da95779a3c    3 minutes ago       Up 3 minutes        80/tcp              modest_meitner

$ sudo tree /var/run/docker/libcontainerd -L 1
├── containerd
├── d4da95779a3c287b28b421194f04374b6330e6ff10f5ca1a99d03828d84f1635
├── docker-containerd.pid
├── docker-containerd.sock
└── event.ts

$ sudo tree /var/run/docker/libcontainerd/d4da95779a3c.../
├── config.json
├── init-stderr
├── init-stdin
└── init-stdout

$ sudo file /var/run/docker/libcontainerd/d4da95779a3c.../config.json
/var/run/docker/libcontainerd/d4da95779a3c.../config.json: ASCII text, with very long lines



For installation instructions from binaries please visit the Releases Page.

Via Go

$ go get github.com/genuinetools/riddler


$ riddler -h
riddler -  A tool to convert docker inspect to the opencontainers runc spec.

Usage: riddler <command>


  --host       Docker Daemon socket(s) to connect to (default: unix:///var/run/docker.sock)
  --idlen      Length of UID/GID ID space ranges for user namespaces (default: 0)
  --idroot     Root UID/GID for user namespaces (default: 0)
  --bundle     Path to the root of the bundle directory (default: <none>)
  -d           enable debug logging (default: false)
  -f, --force  force overwrite existing files (default: false)
  --hook       Hooks to prefill into spec file. (ex. --hook prestart:netns) (default: [])


  version  Show the version information.


For seccomp and apparmor support you will need:

  • sys/apparmor.h
  • seccomp.h

OR to compile without those run:

$ make build BUILDTAGS=""


# just pass the container name or id on run

$ riddler chrome
config.json has been saved.


  • fixup various todos (mostly runtime config parsing)
  • add more unit tests for each field