host:~/runcdir# ls -la
total 16
drwxr-xr-x 3 root root 4096 6月 23 04:22 .
drwx------ 17 root root 4096 6月 23 04:29 ..
-rw-r--r-- 1 root root 2082 6月 23 03:35 container.json
drwxr-xr-x 21 root root 4096 6月 23 04:24 rootfs
ダメなとき
host:~/runcdir# ../runc
Timestamp: 2015-06-23 04:22:47.005279311 +0900 JST
Code: System error
Message: fork/exec ../runc: no such file or directory
良い時
host:~/runcdir# /root/runc
$
host:~/runcdir# ~/runc
$
/usr/local/sbin/runc にいれて PATH 通した場合も大丈夫だったはず
プログラムの中で rootfs に chdir して runc を exec してるから
3602 04:26:46.364413 chdir("/root/runcdir/rootfs" <unfinished ...>
3602 04:26:46.364781 execve("../runc", ["../runc", "init"], [/* 2 vars */] <unfinished ...>
runc を対象の場所に用意してあげれば動く
host:~/runcdir# ln -snvf ../runc
‘./runc’ -> ‘../runc’
host:~/runcdir# ls -l
total 8
-rw-r--r-- 1 root root 2082 6月 23 03:35 container.json
drwxr-xr-x 21 root root 4096 6月 23 04:32 rootfs
lrwxrwxrwx 1 root root 7 6月 23 04:32 runc -> ../runc
host:~/runcdir# ../runc
$