I installed docker using this command:
wget -qO- https://get.docker.com/ | sh
If I run docker info
or docker build .
I receive this error:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
I already tried:
- sudo usermod -aG docker $USER
- Restart the entire OS
- run docker commands with sudo
Some relevant information:
sudo service docker status
returns:
docker start/running, process 30984
docker --version
returns:
Docker version 17.04.0-ce, build 4845c56
ls /var/run/docker.sock -ls
returns:
0 srw-rw---- 1 root docker 0 Apr 21 23:51 /var/run/docker.sock
EDIT 1:
Here’s the /var/log/upstart/docker.log
mount: wrong fs type, bad option, bad superblock on cgroup,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so
/var/run/docker.sock is up
time="2017-04-22T04:12:02.836658053+03:00" level=info msg="libcontainerd:
new containerd process, pid: 16015"
time="2017-04-22T04:12:03.842433492+03:00" level=error msg="'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded."
time="2017-04-22T04:12:03.844424372+03:00" level=error msg="'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded."
time="2017-04-22T04:12:03.848579949+03:00" level=info msg="Graph migration to content-addressability took 0.00 seconds"
time="2017-04-22T04:12:03.849767333+03:00" level=warning msg="Your kernel does not support oom control"
time="2017-04-22T04:12:03.849804648+03:00" level=warning msg="Your kernel does not support memory swappiness"
time="2017-04-22T04:12:03.849833084+03:00" level=warning msg="Your kernel does not support kernel memory limit"
time="2017-04-22T04:12:03.849856157+03:00" level=warning msg="Unable to find cpu cgroup in mounts"
time="2017-04-22T04:12:03.849916780+03:00" level=warning msg="Unable to find cpuset cgroup in mounts"
time="2017-04-22T04:12:03.849991956+03:00" level=warning msg="mountpoint for pids not found"
Error starting daemon: Devices cgroup isn't mounted
EDIT 2:
The moby/contrib/check-config.sh at master · moby/moby · GitHub script says that CONFIG_IP_NF_NAT is missing, how can I enable that?
info: reading kernel config from /boot/config...
Generally Necessary:
...
- CONFIG_IP_NF_NAT: missing
...
Edit 3:
running dockerd
manually gives the following output:
INFO[0000] libcontainerd: new containerd process, pid: 4368
WARN[0000] containerd: low RLIMIT_NOFILE changing to max current=1024 max=4096
ERRO[0001] 'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded.
ERRO[0001] 'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded.
INFO[0001] Graph migration to content-addressability took 0.00 seconds
WARN[0001] Your kernel does not support oom control
WARN[0001] Your kernel does not support memory swappiness
WARN[0001] Your kernel does not support kernel memory limit
WARN[0001] Unable to find cpu cgroup in mounts
WARN[0001] Unable to find cpuset cgroup in mounts
WARN[0001] mountpoint for pids not found
Error starting daemon: Devices cgroup isn't mounted