genuinetools / img

Standalone, daemon-less, unprivileged Dockerfile and OCI compatible container image builder.
https://blog.jessfraz.com/post/building-container-images-securely-on-kubernetes/
MIT License
3.89k stars 230 forks source link

unpack: failed to find runc binary #233

Closed zhangyoufu closed 4 years ago

zhangyoufu commented 5 years ago
/ $ img pull alpine
Pulling alpine...
Pulled: sha256:b74dfec8b5a0a7d017aad049da9d4b9d009d0ca1c35901376ff08280a2ae5e58
Size: 2.63MiB
/ $ img unpack alpine
WARN[0000] Process sandbox is not available, consider unmasking procfs: mount: permission denied (are you root?)

creating worker opt failed: failed to find runc binary

similar to issue #204

https://github.com/genuinetools/img/blob/013bb211567bb92374315affaf0ffa1787fb23c2/unpack.go#L24 maybe this line should be changed to true?

issue-label-bot[bot] commented 5 years ago

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.87. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

kekoav commented 5 years ago

@zhangyoufu This sounds like #231 , I have fixed some runc issues in my fork. I have PRs pending. https://github.com/kekoav/img

kekoav commented 5 years ago

@zhangyoufu With my fork, I was able do the following:

$ docker run --rm -it \
>     --security-opt seccomp=unconfined --security-opt apparmor=unconfined \
>     --entrypoint /bin/sh \
>     --workdir /tmp \
>     kekoav/img
/tmp $ img pull alpine
Pulling alpine...
Pulled: sha256:34b01a20e0d265542de0dfe37f04adee7d30f878adf4ff002284403661980be9
Size: 2.63MiB
/tmp $ img unpack alpine
WARN[0000] Process sandbox is not available, consider unmasking procfs: mount: permission denied (are you root?) 
Successfully unpacked rootfs for alpine to: /tmp/rootfs
/tmp $ ls -a /tmp/rootfs/
.      ..     bin    dev    etc    home   lib    media  mnt    opt    proc   root   run    sbin   srv    sys    tmp    usr    var

I do get a warning about procfs, but the unpack seems to work. This is likely fixed by #232 .

zhangyoufu commented 5 years ago

@kekoav It works for me. Thanks!

kekoav commented 4 years ago

@AkihiroSuda this is resolved, please close.