CentOS 7 : docker in docker: "Error: No space left on device" - docker

I been tackling trying to get docker-in-docker working for a CentOS 7 image, with ubuntu as the host image.
As of now i have not started building this as a docker image. And is currently experimenting with bash on how to "get docker in docker to work"
Currently systemctl start docker ran inside the inner docker image CentOS gives the following error
Error: No space left on device
Job for docker.service failed. See 'systemctl status docker.service' and 'journalctl -xn' for details.
Further investigation on the error systemctl status docker gives the following
Oct 13 04:32:08 codenvy docker[6520]: time="2015-10-13T04:32:08Z" level=info msg="Listening for HTTP on unix (/var/run/docker.sock)"
Oct 13 04:32:08 codenvy docker[6520]: time="2015-10-13T04:32:08Z" level=warning msg="Running modprobe bridge nf_nat failed with message: , error: exit status 1"
Oct 13 04:32:08 codenvy docker[6520]: time="2015-10-13T04:32:08Z" level=info msg="-job init_networkdriver() = OK (0)"
Oct 13 04:32:09 codenvy docker[6520]: time="2015-10-13T04:32:09Z" level=warning msg="Your kernel does not support cgroup swap limit."
Oct 13 04:32:09 codenvy docker[6520]: time="2015-10-13T04:32:09Z" level=info msg="Loading containers: start."
Oct 13 04:32:09 codenvy docker[6520]: time="2015-10-13T04:32:09Z" level=info msg="Loading containers: done."
Oct 13 04:32:09 codenvy docker[6520]: time="2015-10-13T04:32:09Z" level=fatal msg="Shutting down daemon due to errors: inotify_add_watch: no space left on device"
Oct 13 04:32:09 codenvy systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Oct 13 04:32:09 codenvy systemd[1]: Failed to start Docker Application Container Engine.
Oct 13 04:32:09 codenvy systemd[1]: Unit docker.service entered failed state.
Additional Information
Host OS: Ubuntu 14.04.2 LTS
Docker Image: codenvy/onprem-multi (which is based on centos:centos7)
Mounted Volumes
/sys/fs/cgroup
/sys/fs/cgroup:/sys/fs/cgroup:ro
/mnt/docker-files-lvm/docker/codenvy/docker:/var/lib/docker
/mnt/docker-files-lvm/docker/codenvy/ldap:/var/lib/ldap
/mnt/docker-files-lvm/docker/codenvy/mongo:/var/lib/mongo
/mnt/docker-files-lvm/docker/codenvy/home:/home
Privileged mode
Note
This is not regarding how to install codenvy, its regarding getting docker itself installed and working. Before installing codenvy
Added: df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/hc--dawn--vg-root 27G 3.5G 23G 14% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 16G 12K 16G 1% /dev
tmpfs 3.2G 1.1M 3.2G 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 16G 37M 16G 1% /run/shm
none 100M 0 100M 0% /run/user
/dev/sda1 236M 95M 129M 43% /boot
/dev/mapper/base--storage-docker--files 886G 52G 790G 7% /mnt/docker-files-lvm
Note: /mnt/docker-files-lvm/docker maps to the /mnt/docker-files-lvm (which is 790GB)

If it is a no space left problem you can configure docker to have it store images and containers elsewhere.
Since you are using systemctl the config file is located here:
/lib/systemd/system/docker.service
You can add a -g option to change where docker store things.
For example:
ExecStart=/usr/bin/docker daemon -g /there_is_space_here -H fd://

Related

can't connect to docker daemon, tho it's started

I run
systemctl status docker
and get
docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2021-05-22 01:13:39 EDT; 2min 58s ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 29937 (dockerd)
Tasks: 16
Memory: 44.2M
CGroup: /system.slice/docker.service
└─29937 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
May 22 01:13:38 mbfgdell dockerd[29937]: time="2021-05-22T01:13:38.546418221-04:00" level=warning msg="Your kernel>
May 22 01:13:38 mbfgdell dockerd[29937]: time="2021-05-22T01:13:38.546439612-04:00" level=warning msg="Your kernel>
May 22 01:13:38 mbfgdell dockerd[29937]: time="2021-05-22T01:13:38.546456513-04:00" level=warning msg="Your kernel>
May 22 01:13:38 mbfgdell dockerd[29937]: time="2021-05-22T01:13:38.546810704-04:00" level=info msg="Loading contai>
May 22 01:13:38 mbfgdell dockerd[29937]: time="2021-05-22T01:13:38.865868481-04:00" level=info msg="Default bridge>
May 22 01:13:39 mbfgdell dockerd[29937]: time="2021-05-22T01:13:39.027302568-04:00" level=info msg="Loading contai>
May 22 01:13:39 mbfgdell dockerd[29937]: time="2021-05-22T01:13:39.173496789-04:00" level=info msg="Docker daemon">
May 22 01:13:39 mbfgdell dockerd[29937]: time="2021-05-22T01:13:39.173625360-04:00" level=info msg="Daemon has com>
May 22 01:13:39 mbfgdell systemd[1]: Started Docker Application Container Engine.
May 22 01:13:39 mbfgdell dockerd[29937]: time="2021-05-22T01:13:39.258181088-04:00" level=info msg="API listen on >
but when i do
docker info
I get
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)
scan: Docker Scan (Docker Inc., v0.7.0)
Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info
Does anyone know what's wrong here?
(i do see a docker.pid in /var/run, however i do NOT see a docker.sock in /var/run)
After further discovery, the socket file is here
/run/docker.sock
not /var/run/docker.sock
the systemd unit file for docker.socket looks like
cat docker.socket
[Unit]
Description=Docker Socket for the API
[Socket]
ListenStream=/var/run/docker.sock
SocketMode=0660
SocketUser=root
SocketGroup=docker
[Install]
WantedBy=sockets.target
not sure if the daemon or the client is wrong, and how to fix it???
UPDATE: hmm it seems if i create a symlink from /var/run/docker.sock to /run/docker.sock it works. Not great, but i guess i'll live with it

Docker is Running But Pycharm Cannot Connect to Docker Daemon

I am new to docker and haven't found a question here to answer the problem I'm experiencing.
I am tryin to use Pycharm to run a dockerfile, in order to debug certain program inside the docker.
I opened the dockerfile in pycharm, and I created a configuration for running the dockerfile.
Running the program results in an error message under the 'services' tab:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
After I Googled the problem, I found this thread: Cannot connect to the Docker daemon at unix:/var/run/docker.sock. Is the docker daemon running?
Which said I should be running sudo dockerd. After some bugs I uninstalled docker completely, and installed it again.
After installation I ran:
systemctl status docker
And the output is:
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2020-09-26 15:06:22 IDT; 59s ago
Docs: https://docs.docker.com
Main PID: 24888 (dockerd)
Tasks: 21
CGroup: /system.slice/docker.service
└─24888 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
So I stopped it using sudo service docker stop
I ran systemctl status docker again and it was indeed stopped:
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Sat 2020-09-26 15:09:29 IDT; 16s ago
Docs: https://docs.docker.com
Process: 24888 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=0/SUCCES
Main PID: 24888 (code=exited, status=0/SUCCESS)
Sep 26 15:06:21 DL-2 dockerd[24888]: time="2020-09-26T15:06:21.919021419+03:00" level=info msg="Loading containers: done."
Sep 26 15:06:22 DL-2 dockerd[24888]: time="2020-09-26T15:06:22.265996712+03:00" level=info msg="Docker daemon" commit=4484c46d9
Sep 26 15:06:22 DL-2 dockerd[24888]: time="2020-09-26T15:06:22.266253446+03:00" level=info msg="Daemon has completed initializa
Sep 26 15:06:22 DL-2 dockerd[24888]: time="2020-09-26T15:06:22.642407513+03:00" level=info msg="API listen on /var/run/docker.s
Sep 26 15:06:22 DL-2 systemd[1]: Started Docker Application Container Engine.
Sep 26 15:09:29 DL-2 systemd[1]: Stopping Docker Application Container Engine...
Sep 26 15:09:29 DL-2 dockerd[24888]: time="2020-09-26T15:09:29.427473508+03:00" level=info msg="Processing signal 'terminated'"
Sep 26 15:09:29 DL-2 dockerd[24888]: time="2020-09-26T15:09:29.428067483+03:00" level=info msg="stopping event stream following
Sep 26 15:09:29 DL-2 dockerd[24888]: time="2020-09-26T15:09:29.428325869+03:00" level=info msg="Daemon shutdown complete"
Sep 26 15:09:29 DL-2 systemd[1]: Stopped Docker Application Container Engine.
So I ran sudo dockerd and it seemed to run fine:
INFO[2020-09-26T15:11:03.918879915+03:00] Starting up
INFO[2020-09-26T15:11:03.919388821+03:00] detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.conf
INFO[2020-09-26T15:11:03.919768789+03:00] parsed scheme: "unix" module=grpc
INFO[2020-09-26T15:11:03.919779317+03:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2020-09-26T15:11:03.919792653+03:00] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0 <nil>}] <nil>} module=grpc
INFO[2020-09-26T15:11:03.919798154+03:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2020-09-26T15:11:03.920399082+03:00] parsed scheme: "unix" module=grpc
INFO[2020-09-26T15:11:03.920409757+03:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2020-09-26T15:11:03.920418642+03:00] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0 <nil>}] <nil>} module=grpc
INFO[2020-09-26T15:11:03.920423441+03:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2020-09-26T15:11:04.050458554+03:00] [graphdriver] using prior storage driver: overlay2
WARN[2020-09-26T15:11:04.212728085+03:00] Your kernel does not support swap memory limit
WARN[2020-09-26T15:11:04.212780116+03:00] Your kernel does not support cgroup rt period
WARN[2020-09-26T15:11:04.212798165+03:00] Your kernel does not support cgroup rt runtime
WARN[2020-09-26T15:11:04.212812782+03:00] Your kernel does not support cgroup blkio weight
WARN[2020-09-26T15:11:04.212830211+03:00] Your kernel does not support cgroup blkio weight_device
INFO[2020-09-26T15:11:04.213206856+03:00] Loading containers: start.
INFO[2020-09-26T15:11:04.547434099+03:00] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address
INFO[2020-09-26T15:11:04.985878757+03:00] Loading containers: done.
INFO[2020-09-26T15:11:05.259805773+03:00] Docker daemon commit=4484c46d9d graphdriver(s)=overlay2 version=19.03.13
INFO[2020-09-26T15:11:05.259975115+03:00] Daemon has completed initialization
INFO[2020-09-26T15:11:05.418371093+03:00] API listen on /var/run/docker.sock
But running the dockerfile again resulted in the same error. Im quite at a loss as to why this happens, so I would appreciate any feedback.
Should more information be needed, let me know and I'll be happy to provide.
Thanks in advance :)
Can you run docker command such as docker images without sudo? If not, you should run sudo usermod -aG docker $USER and then you can use docker command as non-root user (https://docs.docker.com/engine/install/linux-postinstall/). I'm not sure if it will solve your problem.
For Pop!_OS users:
If you installed PyCharm / PhpStorm / IntelliJ via PoP!_Shop as flatpack image:
flatpak override --user --filesystem=/run/docker.sock com.jetbrains.PyCharm-Community
Change the trailing jetbrains product name (here:PyCharm-Community) according to the used version / flavour.
Just restart the computer/laptop if other suggestions did not help. It helped me :)

Duplicate installation of docker from both iso and apt

question
A virtual machine of mine is ubuntu, docker is installed when install ubuntu from iso. After that, I installed again from apt, because previous one is not registered in "systemctl". Now , there is two space for both docker, just like following.
Two docker have their own space for "docker ps / image CMD" .
Reboot start with "SPACE docker A", and "systemctl status" works good. Once "systemctl restart", move to "SPACE docker B".
If I want remove "SPACE docker A". How can I do it? I would be very grateful if any suggestion is given.
For now, my workaround is manually systemctl restart every time.
appendix
root#wzhjworkmachine:~/gitRoot# echo "now I reboot"
now I reboot
root#wzhjworkmachine:~/gitRoot# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2020-08-24 04:12:19 UTC; 1min 10s ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 941 (dockerd)
Tasks: 11
Memory: 118.5M
CGroup: /system.slice/docker.service
└─941 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
Aug 24 04:12:19 wzhjworkmachine dockerd[941]: time="2020-08-24T04:12:19.395653457Z" level=warning msg="Your kernel does not support cgroup rt runtime"
Aug 24 04:12:19 wzhjworkmachine dockerd[941]: time="2020-08-24T04:12:19.395739427Z" level=warning msg="Your kernel does not support cgroup blkio weight"
Aug 24 04:12:19 wzhjworkmachine dockerd[941]: time="2020-08-24T04:12:19.395827870Z" level=warning msg="Your kernel does not support cgroup blkio weight_device"
Aug 24 04:12:19 wzhjworkmachine dockerd[941]: time="2020-08-24T04:12:19.396046259Z" level=info msg="Loading containers: start."
Aug 24 04:12:19 wzhjworkmachine dockerd[941]: time="2020-08-24T04:12:19.631892982Z" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option -->
Aug 24 04:12:19 wzhjworkmachine dockerd[941]: time="2020-08-24T04:12:19.666930410Z" level=info msg="Loading containers: done."
Aug 24 04:12:19 wzhjworkmachine dockerd[941]: time="2020-08-24T04:12:19.719311959Z" level=info msg="Docker daemon" commit=afacb8b7f0 graphdriver(s)=overlay2 version=19.03.8
Aug 24 04:12:19 wzhjworkmachine dockerd[941]: time="2020-08-24T04:12:19.720376021Z" level=info msg="Daemon has completed initialization"
Aug 24 04:12:19 wzhjworkmachine systemd[1]: Started Docker Application Container Engine.
Aug 24 04:12:19 wzhjworkmachine dockerd[941]: time="2020-08-24T04:12:19.752861257Z" level=info msg="API listen on /run/docker.sock"
root#wzhjworkmachine:~/gitRoot# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
root#wzhjworkmachine:~/gitRoot# docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
wzhjv001 v1 0127641f0d76 2 days ago 867MB
hub.ark.jd.com/wzhj-compile-image4jenkins/quickcompile gov1.14 0127641f0d76 2 days ago 867MB
root#wzhjworkmachine:~/gitRoot# systemctl restart docker
root#wzhjworkmachine:~/gitRoot# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2020-08-24 04:13:45 UTC; 6s ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 2103 (dockerd)
Tasks: 12
Memory: 38.4M
CGroup: /system.slice/docker.service
└─2103 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
Aug 24 04:13:45 wzhjworkmachine dockerd[2103]: time="2020-08-24T04:13:45.183475793Z" level=warning msg="Your kernel does not support cgroup rt runtime"
Aug 24 04:13:45 wzhjworkmachine dockerd[2103]: time="2020-08-24T04:13:45.183480494Z" level=warning msg="Your kernel does not support cgroup blkio weight"
Aug 24 04:13:45 wzhjworkmachine dockerd[2103]: time="2020-08-24T04:13:45.183485240Z" level=warning msg="Your kernel does not support cgroup blkio weight_device"
Aug 24 04:13:45 wzhjworkmachine dockerd[2103]: time="2020-08-24T04:13:45.183615822Z" level=info msg="Loading containers: start."
Aug 24 04:13:45 wzhjworkmachine dockerd[2103]: time="2020-08-24T04:13:45.269534194Z" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option ->
Aug 24 04:13:45 wzhjworkmachine dockerd[2103]: time="2020-08-24T04:13:45.303140798Z" level=info msg="Loading containers: done."
Aug 24 04:13:45 wzhjworkmachine dockerd[2103]: time="2020-08-24T04:13:45.313875267Z" level=info msg="Docker daemon" commit=afacb8b7f0 graphdriver(s)=overlay2 version=19.03.8
Aug 24 04:13:45 wzhjworkmachine dockerd[2103]: time="2020-08-24T04:13:45.314078704Z" level=info msg="Daemon has completed initialization"
Aug 24 04:13:45 wzhjworkmachine dockerd[2103]: time="2020-08-24T04:13:45.326129124Z" level=info msg="API listen on /run/docker.sock"
Aug 24 04:13:45 wzhjworkmachine systemd[1]: Started Docker Application Container Engine.
root#wzhjworkmachine:~/gitRoot# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1d09c0866672 9f266d35e02c "/bin/bash" About a minute ago Exited (0) About a minute ago intelligent_rhodes
root#wzhjworkmachine:~/gitRoot# docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
centos 7.4.1708 9f266d35e02c 17 months ago 197MB

Unable to run docker-compose

Following this article on Jhipster, I build the project. I, however, can't run docker-compose. So, I try to figure out the problem. I walk step by step with this Docker-Compose article without luck.
$ sudo service docker status
docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2018-12-27 15:40:22 PST; 2 days ago
Docs: https://docs.docker.com
Main PID: 1960 (dockerd)
Tasks: 20 (limit: 4440)
Memory: 68.2M
CGroup: /system.slice/docker.service
├─1960 /usr/bin/dockerd -H fd://
└─2093 docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --s
Dec 27 15:40:10 tk-PC dockerd[1960]: time="2018-12-27T15:40:10.493340278-08:00" level=warning msg="Your kernel does not support swap memory li
Dec 27 15:40:10 tk-PC dockerd[1960]: time="2018-12-27T15:40:10.493612101-08:00" level=warning msg="Your kernel does not support cgroup rt peri
Dec 27 15:40:10 tk-PC dockerd[1960]: time="2018-12-27T15:40:10.493681034-08:00" level=warning msg="Your kernel does not support cgroup rt runt
Dec 27 15:40:10 tk-PC dockerd[1960]: time="2018-12-27T15:40:10.496381656-08:00" level=info msg="Loading containers: start."
Dec 27 15:40:17 tk-PC dockerd[1960]: time="2018-12-27T15:40:17.498415923-08:00" level=info msg="Default bridge (docker0) is assigned with an I
Dec 27 15:40:19 tk-PC dockerd[1960]: time="2018-12-27T15:40:19.646853084-08:00" level=info msg="Loading containers: done."
Dec 27 15:40:22 tk-PC dockerd[1960]: time="2018-12-27T15:40:22.512083092-08:00" level=info msg="Daemon has completed initialization"
Dec 27 15:40:22 tk-PC dockerd[1960]: time="2018-12-27T15:40:22.512266914-08:00" level=info msg="Docker daemon" commit=89658be graphdriver=aufs
Dec 27 15:40:22 tk-PC dockerd[1960]: time="2018-12-27T15:40:22.553322342-08:00" level=info msg="API listen on /var/run/docker.sock"
Dec 27 15:40:22 tk-PC systemd[1]: Started Docker Application Container Engine.
$ sudo ls -la /var/run/docker.sock
srw-rw---- 1 root docker 0 Dec 27 15:39 /var/run/docker.sock
$ sudo usermod -aG docker ${USER}
$ docker-compose -f docker-compose.yml build --build-arg UID=$(id -u)
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
The result of the last step is the same as "docker-compose up -d". According to the article, it would be a permission problem if the problem still exists at this point. How can I find what permission issue?
There are multiple ways you can solve this problem. Firstly try to export environment variable of docker host with command:
export DOCKER_HOST=/var/run/docker.sock
If it works you can add the same line to your bashrc config to save this export permanently.
If it doesn't work you can try to modify docker daemon config. It located in
/etc/docker/daemon.json
You'll need to append the localhost to your hosts like that:
"hosts": ["old_hosts_not_modified_only_append_new_one", "tcp://localhost:2376"],
and restart docker daemon using command:
service docker restart
Hope it gonna help ya

cannot start docker daemon (graphdriver issue)

running Ubuntu 16.04.5 LTS 4.4.0-108-generic on a virtual private server
My aim is to deploy a meteor application with mup.js,
but it fails because of dockerd not being launched. The problem is, i cannot get dockerd to launch after a system reboot.
I tried changing graphdriver as suggested in other threads
(Not able to start docker on Ubuntu 16.04.2 LTS (error initializing graphdriver)), switching to aufs or overlay2, but to no avail. I also updated my kernel, purged docker repos, reinstalled docker on my machine.
i have close to no experience working with docker, and the website i'm trying to put back online is part of a show, the last night of which is tomorrow! i must say i'm getting a bit desperate, any help is welcome.
thank you!
docker & dockerd are both version 18.06.1-ce, build e68fc7a
$ sudo dockerd
INFO[0000] libcontainerd: new containerd process, pid: 3488
WARN[0000] containerd: low RLIMIT_NOFILE changing to max current=1024 max=1048576
WARN[0000] failed to rename /var/lib/docker/tmp for background deletion: %!s(<nil>). Deleting synchronously
Error starting daemon: error initializing graphdriver: driver not supported
journalctl -xe yields :
Oct 03 01:22:19 vps332343 systemd[1]: Listening on Docker Socket for the API.
-- Subject: Unit docker.socket has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.socket has finished starting up.
--
-- The start-up result is done.
Oct 03 01:22:19 vps332343 systemd[1]: docker.service: Start request repeated too quickly.
Oct 03 01:22:19 vps332343 systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has failed.
--
-- The result is failed.
Oct 03 01:22:19 vps332343 systemd[1]: docker.socket: Unit entered failed state.
Oct 03 01:22:37 vps332343 sudo[3651]: eboutin : TTY=pts/0 ; PWD=/etc/nginx/sites-available ; USER=root ; COMMAND=/bin/journalctl -xe
Oct 03 01:22:37 vps332343 sudo[3651]: pam_unix(sudo:session): session opened for user root by eboutin(uid=0)
df -tH yields :
Filesystem Type Size Used Avail Use% Mounted on
udev devtmpfs 970M 0 970M 0% /dev
tmpfs tmpfs 196M 5.6M 190M 3% /run
/dev/vda1 ext4 9.7G 4.6G 5.1G 48% /
copymods tmpfs 977M 28K 977M 1% /lib/modules
tmpfs tmpfs 977M 68K 977M 1% /dev/shm
tmpfs tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs tmpfs 977M 0 977M 0% /sys/fs/cgroup
tmpfs tmpfs 196M 0 196M 0% /run/user/1002
tmpfs tmpfs 196M 0 196M 0% /run/user/1001
/etc/docker/daemon.json contents :
{"storage-driver":"devicemapper"}
(no other modified config file)
Try to configure devicemapper as a storage driver and clean /var/lib/docker/ folder before docker start rm -rf /var/lib/docker/* (it will delete all your previous containers/volumes/...).
Check any warnings from docker info, when docker will be running - they may help you with additional configuration.
This can also be due to a recent kernel update that might have messed up the graphdriver: devicemapper.
So when rm -rf /var/lib/docker/* and reinstalling Docker does not work. Try reinstalling kernel image and reboot.
$ sudo apt-get install --reinstall linux-image-`uname -r`
$ sudo reboot

Resources