Do not install legacy Docker, if an older version can be uninstalled using the command first .
$ sudo apt-get remove Docker docker-engine Docker.io
To be able to update Docker, I chose to install the Docker repository first.
(1) Update
$ sudo apt-get update
(2) Install the package so that apt can use the repository via https:
$ sudo apt-get install \
APT-TRANSPORT-HTTPS \
Ca-certificates \
Curl \
Software-properties-common
(3) Add encryption key
$ Curl-fssl HTTPS://MIRRORS.ALIYUN.COM/DOCKER-CE/LINUX/UBUNTU/GPG | sudo apt-key add-
Verify The key fingerprint is 9dc8 5822 9fc7 DD38 854A e2d8 8d81 803C 0EBF CD88.
$ sudo apt-key fingerprint 0ebfcd88
Pub 4096r/0ebfcd88 2017-09-9
Key fingerprint = 9dc8 5822 9fc7 DD38 854A e2d8 8d81 803C 0EBF CD88
UID Docker Release (CE deb) <[email protected]>
Sub 4096r/f273fcd8 2017-09-9
The warehouse is now installed.
In the case of a domestic server, replace the https://download.docker.com/linux/with https://mirrors.aliyun.com/docker-ce/linux/. The goal is to hurry.
If you are installing the key times 443 error, you can download the key on your browser and then use apt-get add if OK is displayed.
Down is the use of stable warehouses:
x86_64:
$ sudo add-apt-repository \
"Deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu \
$ (LSB_RELEASE-CS) \
Stable
Finally, download the Docker Community Edition:
Apt-get Update
Apt-get Install Docker-ce
This article is from the "11716212" blog, please be sure to keep this source http://11726212.blog.51cto.com/11716212/1963906
Ubuntu installs the latest Docker