Ubuntu 14.04 and later
The Ubuntu 14.04 version of the official software source has its own Docker package, which can be installed directly
$sudo apt-get Update
$sudo Apt-get install-y Docker.io
$sudo Ln-sf/usr/bin/docker.io/usr/local/bin/docker
$sudo sed-i ' $scomplete-F _docker Docker '/ete/bash_completion.d/docker.io
The above process installs Docker using the default Docker.io installation package of the Ubuntu 14.04 system, so that the installed version is relatively old.
Alternatively, we can install the latest version from the official Docker source in the following ways. First you need to install Apt-transport-https and add the Docker official source:
$sudo Apt-get Install Apt-transport-https
$sudo apt-key adv--keyserver hkp://keyserver.ubuntu.com:80--recv-keys 36a1d7869245c8950f966e92d8576a8ba88d21e9
$sudo bash-v "Echo Deb Https://get.docker.io/ubuntu Docker main >/etc/apt/sources.list.d/docker.list"
$sudo apt-get Update
Later, you can install the latest version of Docker with the following command:
$sudo Apt-get install-y Lxc-docker
After installing the official Docker software source, if you need to update the Docker software version, simply execute the following command to upgrade:
$sudo Apt-get update-y Lxc-docker
Ubuntu Install Docker