Docker CE installs on Ubuntu

Source: Internet
Author: User
Tags curl gpg docker run

Installing Docker CE requires more than UBUNTU14 version
    • Bionic 18.04 (LTS)
    • Artful 17.10
    • Xenial 16.04 (LTS)
    • Trusty 14.04 (LTS)

Docker CE is a kind x86_64 armhf of architecture supported on Ubuntu, s390x (IBM Z), and ppc64le (IBM Power).

Uninstall the old version of Docker

The old version of Docker is called Docker or docker-engine, and if it is installed, it can be uninstalled by command;

1 $ sudo apt-get remove Docker docker-engine Docker.io
Installing Docker CE using the warehouse for installation
  1. Update apt package before installation;
    $ sudo apt-get update
  2. Install packages to allow apt to use warehouses over HTTPS;
    $ sudo apt-get install     apt-transport-HTTPS     CA-certificates     Curl     software -properties-common
  3. Add the official GPG key for Docker;
    $ Curl-fssl HTTPS://DOWNLOAD.DOCKER.COM/LINUX/UBUNTU/GPG | sudo apt-key add-
  4. The last 8 characters of the fingerprint are verified by the fingerprint Identification code 9DC8 5822 9fc7 DD38 854A e2d8 8d81 803C 0EBF CD88
    $ sudo apt-key fingerprint 0ebfcd88pub   4096R/0ebfcd88 2017-02-22      = 9dc8 5822 9fc7 DD38 854A  e2d8 8d81 803C 0EBF cd88uid                  <[email protected]>Sub   4096R/F273FCD8 2017-02-22
  5. Set up a stable warehouse, add edge or test after table in the following command if you need to add a test or Edge warehouse
    $ sudo add-apt-repository    "Deb [arch=amd64] Https://download.docker.com/linux/ubuntu    $ (LSB_RELEASE-CS)    stable"
Installing the Docker CE
    1. Update APT Package
      $ sudo apt-get update
    2. Install the latest version of Docker-ce
      $ sudo apt-get install Docker-ce
    3. Install the specified version of Docker-ce
      A. List the available versions
      $ apt-cache Madison docker-cedocker-ce | 18.03.0~ce-0~ubuntu | Https://download.docker.com/linux/ubuntu xenial/stable AMD64 Packages

      B. Specifying a version for installation

      $ sudo apt-get install docker-ce=<version>
    4. Run Hello-world mirroring to verify that Docker-ce is installed correctly
      $ sudo docker run Hello-world

      The command downloads the test image and runs it into the container. When the container is running, it prints an informational message and exits.

Docker CE is installed and running. The Docker group was created, but the user was not added. You need to use sudo to run the Docker command.

Docker CE installs on Ubuntu

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.