On Sun, Apr 26, 2020 at 10:38 AM Shengjing Zhu <z...@debian.org> wrote: > > On Sun, Apr 26, 2020 at 6:15 AM Dmitry Smirnov <only...@debian.org> wrote: > > > > On Sunday, 26 April 2020 12:14:25 AM AEST Tomas Janousek wrote: > > > Debian installs runc as /usr/sbin/runc, and regular users don't have > > > /usr/sbin in $PATH, so "buildah run" without "--runtime /usr/sbin/runc" > > > fails: > > > > > > $ buildah run debian-working-container -- sh > > > error running container: error creating container for [/bin/sh]: : > > > exec: "runc": executable file not found in $PATH ERRO exit status 1 > > > > Interesting. Thanks. Perhaps we should hard-code path to "runc" in "util/ > > types.go". > > > > Documentation suggests to set path to runtime in the BUILDAH_RUNTIME > > environment variable: > > > > export BUILDAH_RUNTIME=/usr/bin/crun > > > > > > With cgroups_v2 You should be able to use "crun" instead of "runc". > > "crun" is the first alternative that is expected to work "out of the box". > > > > > > > I'd expect this to work out of the box. > > > > I'm not sure it can be done because of requirement to set > > "kernel.unprivileged_userns_clone=1". > > > > Shouldn't we move /usr/sbin/runc to /usr/bin/runc, since runc now has > rootless mode after setting kernel.unprivileged_userns_clone? >
Just checked the path in other distributions, fedora and archlinux install it in /usr/bin now. https://apps.fedoraproject.org/packages/runc/contents/ https://www.archlinux.org/packages/community/x86_64/runc/ opensuse installs a symlink a /usr/bin. https://build.opensuse.org/package/view_file/openSUSE:Factory/runc/runc.spec?expand=1 -- Shengjing Zhu