Reputation: 143
I'm running a virtual machine in Windows Azure with the prebuild image for Ubuntu 14.04 LTS.
When I want to install Docker.io
like described here:
http://blog.docker.io/2014/04/docker-in-ubuntu-ubuntu-in-docker/
The installation works but when i`m running:
sudo docker.io pull ubuntu
An error will be thrown:
Cannot connect to the Docker daemon. Is
docker -d
running on this host?
Can anyone help or has the similar problem?
P.S.: Can anyone with a high reputation create a Tag for Ubuntu-14.04?
Upvotes: 8
Views: 16824
Reputation: 461
Hard to say but sometime official docker installation procedure fails on Ubuntu 14.04. One can simply install docker using below given commands [Quick and Dirty]
sudo apt-get update
sudo apt-get -y install docker.io
Upvotes: 0
Reputation: 60043
Run docker -d
to see if it shows any error messages.
If apparmor is missing install it with sudo apt-get install apparmor
Then sudo service docker start
Upvotes: 1
Reputation: 5348
Adding myself to the docker group:
sudo usermod -a -G docker myuser
and rebooting the machine worked for me. This solution is discussed in: https://github.com/docker/docker/issues/5314
Upvotes: 6
Reputation: 22375
On Ubuntu 14.04, the docker.io
package installs Docker 0.9.1.
According to the documentation, to install the current version use these commands:
$ 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 the azure-docker-registry project for an example of how to automate Azure provisioning and Docker container deployment. For instance, this 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
Upvotes: 4
Reputation: 2569
Also make sure to symlink the docker.io
binary to docker
to use the tutorials/documentation without rewriting every command.
ln -s /usr/bin/docker.io /usr/bin/docker
Upvotes: 1
Reputation: 2634
Evidently the docker daemon is not running. You wanna check /etc/default/docker.conf for proper configuration and issue
sudo service docker.io start
or
sudo service docker start
depending on how they called the service
Upvotes: 6