Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

docker run hello-world still fails, permission denied

I'm trying to run docker but it still fails. Here is what i get

root@c1170137:~# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world

c04b14da8d14: Extracting    974 B/974 B
docker: failed to register layer: ApplyLayer exit status 1 stdout:  stderr: permission denied.
See 'docker run --help'.

kernel: 4.4.16-1-pve

i'm using debian jessie

Distributor ID: Debian
Description:    Debian GNU/Linux 8.5 (jessie)
Release:        8.5
Codename:       jessie

Edit: daemon.log http://hastebin.com/qinufacuto.coffee

docker info

root@c1177124:~# docker info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 0
Server Version: 1.12.1
Storage Driver: vfs
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: host bridge null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options:
Kernel Version: 4.4.16-1-pve
Operating System: Debian GNU/Linux 8 (jessie)
OSType: linux
Architecture: x86_64
CPUs: 32
Total Memory: 2 GiB
Name: c1177124
ID: 4YUJ:OL2E:WLJC:23WJ:5HRW:LRY3:QHKC:MKXO:JDWO:VWOQ:JMWN:V52W
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
Insecure Registries:
 127.0.0.0/8

By the way, the problem could be caused by the kernel. Thank you for any idea or solution

like image 524
lilo17 Avatar asked Sep 18 '16 12:09

lilo17


People also ask

How to fix Docker permission denied in Linux?

Fix 1: Run all the docker commands with sudo. If you have sudo access on your system, you may run each docker command with sudo and you won’t see this ‘Got permission denied while trying to connect to the Docker daemon socket’ anymore. But running each and every docker command with sudo is super inconvenient.

How to fix Docker run Hello-World error « mounting proc to rootfs…permission denied »?

Now the docker daemon should be OK ; it’s time for the second error: docker run hello-world returns an error « mounting proc to rootfs…permission denied » As expected, the solution is to enable nested containerization on LXC /Proxmox. This must be done by your VPS provider (or some API it would provide to its users).

Why can't I run Docker with sudo?

In some cases, you may need to add additional permissions to some files specially if you have run the docker commands with sudo in the past. You may try changing the group ownership of the /var/run/docker.sock file. You may also try changing the group ownership of the ~/.docker directory. And then try running docker with sudo. It should be fine.

Why am I getting a docker daemon error message?

This error may also indicate that the docker daemon is not running. See 'docker run --help'.


Video Answer


1 Answers

Iam Solved this problem with execute this command on Host:

lxc config set your-lxc-name security.nesting true

lxc config set your-lxc-name security.privileged true

like image 134
Fahrudin Wijaya Avatar answered Sep 21 '22 16:09

Fahrudin Wijaya