Installing Docker.io on Ubuntu 14.04LTS

I am running a virtual machine on Windows Azure with a sample pre-build for Ubuntu 14.04LTS. When I want to install Docker.io as described here: http://blog.docker.io/2014/04/docker-in-ubuntu-ubuntu-in-docker/

Installation works, but when I run:

sudo docker.io pull ubuntu 

woll error is raised:

 Cannot connect to the Docker daemon. Is 'docker -d' running on this host? 

Can anyone help or have a similar problem?

ps: Can someone with a high reputation create a tag for Ubuntu-14.04 ??

thanks

+8
docker ubuntu azure
source share
5 answers

Obviously, the docker daemon is not working. You want to check /etc/default/docker.conf for proper configuration and release

 sudo service docker.io start 

or

 sudo service docker start 

depending on how they are called a service

+6
source share

Adding yourself to the docker group:

 sudo usermod -a -G docker myuser 

and rebooting the machine worked for me. This solution is discussed at: https://github.com/docker/docker/issues/5314

+6
source share

On Ubuntu 14.04, the docker.io package installs Docker 0.9.1.

According to the documentation, use the following commands to install the current version:

 $ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 $ sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" $ sudo apt-get update $ sudo apt-get install lxc-docker 

There is also a simple script available to help with this process:

 $ curl -s https://get.docker.io/ubuntu/ | sudo sh 

Alternatively, check out the azure-docker-registry project for an example of how to automate Azure provisioning and Docker container deployment. For example, this is Ansible playbook :

 - name: create docker data directory file: path=/mnt/data/docker state=directory - name: store docker files in data disk file: src=/mnt/data/docker dest=/var/lib/docker state=link - name: add repository key command: creates=/etc/apt/sources.list.d/docker.list apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 - name: copy repository source file copy: src=docker.list dest=/etc/apt/sources.list.d/docker.list - name: install docker package apt: name=lxc-docker update_cache=yes state=present 
+4
source share

Also remember to link the docker.io binary to docker so that you can use the tutorials / documentation without overwriting each command.

 ln -s /usr/bin/docker.io /usr/bin/docker 
+1
source share

Run docker -d to see if any error messages are displayed.

If apparmor is missing, install it using sudo apt-get install apparmor

Then sudo service docker start

+1
source share

All Articles