Installing Docker under ubuntu16.04

Source: Internet
Author: User

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
    • 1
    • Update APT Package index:
sudo apt-get update
    • 1
    • 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
    • 1
    • Add Docker's official GPG key:
sudo apt-key add -
    • 1
    • 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"
    • 1
    • Update the APT package index again:
sudo apt-get update
    • 1
    • Install the latest version of Docker CE:
sudo apt-get install -y docker-ce
    • 1
    • 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
    • 1


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>
    • 1
Verifying Docker
    • To see if the Docker service is started:
$ systemctl status docker
    • 1
    • If it does not start, start the Docker service:
sudo systemctl start docker
    • 1
    • The classic Hello World:
sudo docker run hello-world
    • 1


The above output proves that Docker has been installed successfully!

Installing Docker under ubuntu16.04

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.