Original Address: Portal
The development environment for Ubuntu 16.04 LTS 64-bit system, the latest Docker CE (Community Edition), the Docker Community Edition, is the ideal choice for developers and small teams through APT's Docker official source.
Start installation
- Since the Docker version in the APT official library may be older, uninstall the old version that may exist:
sudo apt-get remove docker docker-engine docker-ce docker.io
- Update APT Package index:
sudo apt-get update
- Install the following packages so that apt can use the Repository (repository) over https:
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
- Add Docker's official GPG key:
sudo apt-key add -
- Use the following command to set up the stable repository:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- Update the APT package index again:
sudo apt-get update
- Install the latest version of Docker CE:
sudo apt-get install -y docker-ce
- On a production system, you might need to install a specific version of Docker CE instead of always using the latest version:
List the available versions:
$ apt-cache madison docker-ce
Select the specific version that you want to install, the second column is the version string, and the third column is the repository name, which indicates which repository the package came from and extends its stability level. To install a specific version, append the version string to the package name and separate them by an equal sign (=):
sudo apt-get install docker-ce=<VERSION>
Verifying Docker
- To see if the Docker service is started:
$ systemctl status docker
- If it does not start, start the Docker service:
sudo systemctl start docker
sudo docker run hello-world
The above output proves that Docker has been installed successfully!
Installing Docker under ubuntu16.04