Tips on getting docker to work without having to run `sudo docker -d` on Ubuntu 15.04 Tips on getting docker to work without having to run `sudo docker -d` on Ubuntu 15.04 docker docker

Tips on getting docker to work without having to run `sudo docker -d` on Ubuntu 15.04


Did u checked this http://docs.docker.com/articles/systemd/? This helped me to start docker under Ubunu 15.04.


What to do if this fails...

$ sudo usermod -aG docker $USER

..and you have added user to docker group and Ubuntu still requires sudo:

If you initially ran Docker CLI commands using sudo before adding your user to the docker group, you may see the following error, which indicates that your ~/.docker/ directory was created with incorrect permissions due to the sudo commands.

To fix this problem, either remove the ~/.docker/ directory (it is recreated automatically, but any custom settings are lost), or change its ownership and permissions using the following commands:

$ sudo chown "$USER":"$USER" /home/"$USER"/.docker -R$ sudo chmod g+rwx "$HOME/.docker" -R


What the link mafahand provided tells is how to use docker on a systemd based host. Ubuntu 15.04 uses systemd now while older version used upstart. That might explain why upgraded systems show erratic behavior. Check out the Ubuntu wiki for some help on that regard.

After installing docker via

sudo apt install docker.io

you might have to reboot your system or start the docker.socket unit manually. For some reason that did not happen on my machine after installing it.

Type

systemctl status docker

to check whether docker is up and running. If it is not enabled use

sudo systemctl enable docker

to enable it permanently and/or

sudo systemctl start docker

to run the service.