I’m running an unprivileged alpine-linux-x64-edge
container started as non-root user.
When i do an lxc-attach -n alpine
i land in some kind of emergency or recovery ash shell with a very limited busybox(?) binary. Commands like help
and exit
exist but not ls
. PS1 is #/
only.
/ # help Built-in commands: ------------------ . : [ [[ alias bg break cd chdir command continue echo eval exec exit export false fg getopts hash help history jobs kill let local printf pwd read readonly return set shift source test times trap true type ulimit umask unalias unset wait
If i start up the container with lxc-attach -n alpine -F
everything is fine. lxc-console
is good as well.
Edit:
When i do an env
it shows my local users (host) environment. That doesn’t belong into the container.
Any idea what’s wrong here?
Arch Linux 5.5.6
lxc v3.2.1
$ cat /etc/subuid
root:100000:65536
root:200000:65536
root:300000:65536
user:100000:65536
$ cat /etc/subgid
root:100000:65536
root:200000:65536
root:300000:65536
user:100000:65536
~/.config/lxc/default.conf
lxc.net.0.type = empty
lxc.idmap = u 0 100000 65536
lxc.idmap = g 0 100000 65536
lxc.net.0.type = veth
lxc.net.0.link = lxcbr0
lxc.net.0.flags = up
lxc.net.0.hwaddr = 00:16:3e:xx:xx:xx