Skip to content

Instantly share code, notes, and snippets.

@mapk0y
Created June 22, 2015 23:47
Show Gist options
  • Save mapk0y/c701b6aaca4da0222b90 to your computer and use it in GitHub Desktop.
Save mapk0y/c701b6aaca4da0222b90 to your computer and use it in GitHub Desktop.
runc のメモ2 jessie で動かすまで

空のディレクトリから

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 作ります。runcspec で出力されます。

host:~/testrunc# runc spec >container.json

実行します

host:~/testrunc# runc
$ 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment