This way the Ubuntu installation process, first of all the official website documents
If you haven ' t already do so, log into your Ubuntu instance.
Open a terminal window.
ADD the new gpg
key.
58118E89F3A912897C070ADBF76221572C52609D
Open the /etc/apt/sources.list.d/docker.list
file in your favorite editor.
If the file doesn ' t exist, create it.
Remove any existing entries.
Add an entry for your Ubuntu operating system.
The possible entries is:
# Ubuntu Precisedeb https://apt.dockerproject.org/repo ubuntu-precise main# Ubuntu Trustydeb https://apt.dockerproject.org/repo ubuntu-trusty main# Ubuntu Vividdeb https://apt.dockerproject.org/repo ubuntu-vivid main# Ubuntu Wilydeb https://apt.dockerproject.org/repo ubuntu-wily main
Save and close the /etc/apt/sources.list.d/docker.list
file.
Update the package apt
index.
$ apt-get update
Purge the old repo if it exists.
$ apt-get purge lxc-docker*
Verify that's pulling from the right apt
repository.
$ apt-cache policy docker-engine
~# Apt-cache Policy docker-Enginedocker-engine:installed:1.8.3-0~Precise candidate:1.8.3-0~wily Version table:1.8.3-0~wily0 -Https//apt.dockerproject.org/repo/ubuntu-wily/main AMD64 Packages 1.8.3-0~vivid0 -Https//apt.dockerproject.org/repo/ubuntu-vivid/main AMD64 Packages 1.8.3-0~trusty0 -Https//apt.dockerproject.org/repo/ubuntu-trusty/main AMD64 Packages***1.8.3-0~precise0 -Https//apt.dockerproject.org/repo/ubuntu-precise/main AMD64 Packages -/var/lib/dpkg/Status1.8.2-0~wily0 -Https//apt.dockerproject.org/repo/ubuntu-wily/main AMD64 Packages 1.8.2-0~vivid0 -Https//apt.dockerproject.org/repo/ubuntu-vivid/main AMD64 Packages 1.8.2-0~trusty0 -Https//apt.dockerproject.org/repo/ubuntu-trusty/main AMD64 Packages 1.8.2-0~precise0 -Https//apt.dockerproject.org/repo/ubuntu-precise/main AMD64 Packages 1.8.1-0~wily0 -Https//apt.dockerproject.org/repo/ubuntu-wily/main AMD64 Packages 1.8.1-0~vivid0 -Https//apt.dockerproject.org/repo/ubuntu-vivid/main AMD64 Packages 1.8.1-0~trusty0 -Https//apt.dockerproject.org/repo/ubuntu-trusty/main AMD64 Packages 1.8.1-0~precise0 -Https//apt.dockerproject.org/repo/ubuntu-precise/main AMD64 Packages 1.8.0-0~wily0 -Https//apt.dockerproject.org/repo/ubuntu-wily/main AMD64 Packages 1.8.0-0~vivid0 -Https//apt.dockerproject.org/repo/ubuntu-vivid/main AMD64 Packages 1.8.0-0~trusty0 -Https//apt.dockerproject.org/repo/ubuntu-trusty/main AMD64 Packages 1.8.0-0~precise0 -Https//apt.dockerproject.org/repo/ubuntu-precise/main AMD64 Packages 1.7.1-0~wily0 -Https//apt.dockerproject.org/repo/ubuntu-wily/main AMD64 Packages 1.7.1-0~vivid0 -Https//apt.dockerproject.org/repo/ubuntu-vivid/main AMD64 Packages 1.7.1-0~trusty0 -Https//apt.dockerproject.org/repo/ubuntu-trusty/main AMD64 Packages 1.7.1-0~precise0 -Https//apt.dockerproject.org/repo/ubuntu-precise/main AMD64 Packages 1.7.0-0~vivid0 -Https//apt.dockerproject.org/repo/ubuntu-vivid/main AMD64 Packages 1.7.0-0~trusty0 -Https//apt.dockerproject.org/repo/ubuntu-trusty/main AMD64 Packages
Finally, a docker-engine version of a specific release is selected for installation
Install -y docker-engine=1.8. 1-0~precise
Docker 1.8+ after Ubuntu installs the specified version Docker-engine