Proxmox LXC container docker not working

On a Proxmox server, LXC container failed to run docker. When I start a docker container, I get the following errors.

root@erpdo:~# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
2db29710123e: Pull complete 
Digest: sha256:2498fce14358aa50ead0cc6c19990fc6ff866ce72aeb5546e1d59caac3d0d60f
Status: Downloaded newer image for hello-world:latest
docker: Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "proc" to rootfs at "/proc" caused: mount through procfd: permission denied: unknown.
root@erpdo:~#

To fix the error, in proxmox, click on the container, then go to Options.

proxmox container options

Proxmox > Container Name > Options > Features

Click on Features, then click edit. You will see a popup like

proxmox edit container features

On this screen, enable the following 2 options

keyctl
Nesting

Stop and start the container. After this, the docker container will work inside the LXC container in proxmox server.

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *