空のディレクトリから
host:~/testrunc# ls -l
total 0
docker export 使って rootfs 作ります。debootstrap でもいいと思う
host:~/testrunc# mkdir -pv rootfs
mkdir: created directory ‘rootfs’
host:~/testrunc# docker run --name=runc01 debian echo && docker export runc01 | tar xf - -C rootfs
host:~/testrunc# ls -la rootfs/
total 76
drwxr-xr-x 2 root root 4096 6月 16 03:37 bin
drwxr-xr-x 2 root root 4096 5月 4 22:20 boot
drwxr-xr-x 4 root root 4096 6月 23 08:45 dev
drwxr-xr-x 41 root root 4096 6月 23 08:45 etc
drwxr-xr-x 2 root root 4096 5月 4 22:20 home
drwxr-xr-x 9 root root 4096 11月 28 2014 lib
drwxr-xr-x 2 root root 4096 6月 16 03:33 lib64
drwxr-xr-x 2 root root 4096 6月 16 03:32 media
drwxr-xr-x 2 root root 4096 6月 16 03:32 mnt
drwxr-xr-x 2 root root 4096 6月 16 03:32 opt
drwxr-xr-x 2 root root 4096 6月 16 03:37 proc
drwx------ 2 root root 4096 6月 16 03:32 root
drwxr-xr-x 3 root root 4096 6月 16 03:32 run
drwxr-xr-x 2 root root 4096 6月 16 03:37 sbin
drwxr-xr-x 2 root root 4096 6月 16 03:32 srv
drwxr-xr-x 2 root root 4096 4月 7 03:44 sys
drwxrwxrwt 2 root root 4096 6月 16 03:37 tmp
drwxr-xr-x 10 root root 4096 6月 16 03:32 usr
drwxr-xr-x 11 root root 4096 6月 16 03:32 var
Container JSON 作ります。runc
の spec
で出力されます。
host:~/testrunc# runc spec >container.json
実行します
host:~/testrunc# runc
$