Unable to start Docker Service in Ubuntu 16.04
Update
It seems that in newer versions of docker and Ubuntu the unit file for docker is simply masked (pointing to /dev/null).
You can verify it by running the following commands in the terminal:
sudo file /lib/systemd/system/docker.service
sudo file /lib/systemd/system/docker.socket
You should see that the unit file symlinks to /dev/null.
In this case, all you have to do is follow S34N's suggestion, and run:
sudo systemctl unmask docker.service
sudo systemctl unmask docker.socket
sudo systemctl start docker.service
sudo systemctl status docker
I'll also keep the original post, that answers the error log stating that the storage driver should be replaced:
Original Post
I had the same problem, and I tried fixing it with Salva Cort's suggestion, but printing /etc/default/docker
says:
# THIS FILE DOES NOT APPLY TO SYSTEMD
So here's a permanent fix that works for systemd (Ubuntu 15.04 and higher):
create a new file
/etc/systemd/system/docker.service.d/overlay.conf
with the following content:[Service]
ExecStart=
ExecStart=/usr/bin/docker daemon -H fd:// -s overlayflush changes by executing:
sudo systemctl daemon-reload
verify that the configuration has been loaded:
systemctl show --property=ExecStart docker
restart docker:
sudo systemctl restart docker
Starting Docker as Daemon on Ubuntu
There are multiple popular repositories offering docker packages for Ubuntu. The package docker.io
is (most likely) from the Ubuntu repository. Another popular one is http://get.docker.io/ubuntu
which offers a package lxc-docker
(I am running the latter because it ships updates faster). Make sure only one package is installed. Not quite sure if removal of the packages cleans up properly. If sudo service docker restart
still does not work, you may have to clean up manually in /etc/.
How to start Docker daemon on Ubuntu?
You can configure docker to start on boot :
sudo systemctl enable docker
The ugly way : start docker manually :
dockerd &
docker service permissions on ubuntu 16.04
I've solved it regarding @rhea's comment. I've previously added my username to the docker group; the trick was to run newgrp docker
in order to log in to docker
group. This gave me the hint.
Error while installing docker in ubuntu 16.04
sudo nano /etc/docker/daemon.json
add this ,
{
"storage-driver": "overlay2"
}
Edit this ,
sudo nano /etc/default/docker
add this . DOCKER_OPTS="-s overlay"
then sudo systemctl daemon-reload
sudo systemctl restart docker ,it will work .
Related Topics
Read a File and Split Each Line into Multiple Variables
How to Create a Statically Linked Position Independent Executable Elf in Linux
How to Get the List of Dependent Child Images in Docker
How to Append the Output to a File
How to Find Ports Opened by Process Id in Linux
Using Jq to Fetch Key Value from JSON Output
How to Execute Script in The Current Shell on Linux
Vagrant Synced Folders Not Working Real-Time on Virtualbox
Cross Compiling for Mips Router from X86
How to Set Process Group of a Shell Script
Rename Multiple Files While Keeping the Same Extension on Linux
How to Make an "Alias" for a Long Path
Linux Sched_Other, Sched_Fifo and Sched_Rr - Differences