OS: Ubuntu 18.04
after docker is installed,
I have checked that the docker service is up and runing.
But this problem occurred.
command:
docker run hello-world
output:
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: context canceled
Icon name: computer-container
Chassis: container
Machine ID: db91a8d9813048b3b0d9627361bf92a2
Boot ID: 808950a9790c4b2bbd8d050407771645
Virtualization: lxc
Operating System: Ubuntu 18.04.1 LTS
Kernel: Linux 5.4.106-1-pve
Architecture: x86-64
As I thought. You want to run containers in a container. More precisely a Docker container in an LXC container. You need to properly configure your LXC container to allow nested containers. Is this LXC container under your control or controlled by a cloud provider?
I know there is a way to run docker containers in an unprivileged LXC container and I did it one time after a similar question in an other topic. I think I followed and maybe modifed this solution:
But If I need an isolated environment for Docker I usually run virtual machines which you can do with LXC 4 too.
lxc launch --vm IMAGENAME VMNAME