Install docker ce on Ubuntu16.10


Initial verification:

Verify that curl is installed

$ which curl

Note: If it is not installed, it shall be installed as follows:

$ sudo apt-get update

$ sudo apt-get install curl

1. Establish ce repository in Ubuntu

(1) Install the package to allow apt to use the repository via HTTPS:

$ sudo apt-get install apt-transport-https ca-certificates curl software-properties-common

(2) Add the official GPG key of Docker:

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Note: Verifiable secret key fingerprint 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88

$ sudo apt-key fingerprint 0EBFCD88

(3) Optionally, the stable repository can be set; otherwise, it will be used automatically (deb [arch=amd64]

https: / / download. docker. com linux/ubuntu xenial stable)

$ sudo add-apt-repository "deb [arch=amd64] $(lsb_release -cs) stable-17.03"

(4) Update apt package

$ sudo apt-get update

2. Install the latest version of ce

$ sudo apt-get -y install docker-ce

3. Test whether the installation is successful

$ sudo docker run hello-world

4. Check your current installed version

$ sudo docker version

5, go to sudo command, set user group

(1) Create docker group

$ sudo apt-get update

$ sudo apt-get install curl

0

(2) Add the current user to docker user group

$ sudo apt-get update

$ sudo apt-get install curl

1

(3) Log out and log back in

(4) Whether the verification is successful

$ sudo apt-get update

$ sudo apt-get install curl

2