I'm trying out Docker for the very first time tonight!
Running Ubuntu 22.04, cli-only. Updated & upgraded everything before & during this process, and it's all on a new account on a new machine.
I've been following the official instructions, but I run into this when launching the test container:
$ sudo docker run hello-world
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "proc" to rootfs at "/proc": mount proc:/proc (via /proc/self/fd/6), flags: 0xe: permission denied: unknown.
ERRO[0000] error waiting for container:
Looking around the internet, it seems that this means I need nested security. Makes sense to me... but there's not much info on how to do that. The best I could find was this SO answer saying I need to use lxc
. Never heard of that, but it seems to be common in this stuff, so I apt-get
it and try their answer, but I get this:
$ lxc config set deploy-container security.nesting true
Traceback (most recent call last):
File "<string>", line 1, in <module>
PermissionError: [Errno 13] Permission denied
/usr/sbin/lxc: 6: exec: /snap/bin/lxc: not found
I see permission denied so I try sudo
:
$ sudo lxc config set deploy-container security.nesting true
Traceback (most recent call last):
File "<string>", line 1, in <module>
ConnectionResetError: [Errno 104] Connection reset by peer
/usr/sbin/lxc: 6: exec: /snap/bin/lxc: not found
Basically the same error. Saying it's in line 1 of <string>
leads me to think that there's some syntax error somewhere but I've no idea where nor what could fix it.
Googling for this, I can't find anything. What's going on and how do I fix it?