Original link: https://docs.docker.com/engine/installation/linux/ubuntu/Here is the community version of the installation, because usually only do development and use, so do not need to install Enterprise Edition, If you want to know how to install the Enterprise Edition, please refer to the official documentation.
- Configuring the CE Environment
Configure apt to allow a mirrored installation to be pulled in HTTPS mode:
sudo Install apt-transport-HTTPS CA-certificates Curl software- Properties-common
Add Docker official GPG key:
$ curl-fssl https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add-
Checksum 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
.
sudo apt-key fingerprint 0ebfcd88
- Configure the stable image with the following command
sudo add-apt-repository "Deb [arch=amd64] https://download.docker.com/linux/ Ubuntu \ $ (lsb_release-CS) stable"
- Update APT Package index
sudo apt-get update
- Install the latest version of Docker
sudo Install Docker-ce
- Verify that Docker is installed successfully
sudo Docker run Hello-world
This command downloads a test image, launches a container to run the image, prints some information, and exits.
At this point, Docker has been installed successfully on Ubuntu!
Installing Docker on Ubuntu