Initial verification:

Verify that curl is installed

$which curl

Note:Install if not already installed,The specific installation is as follows:

$sudo apt-get update
$sudo apt-get install curl

1.Build 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 docker's official gpg key:

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

Note:verifiable key fingerprint 9dc8 5822 9fc7 dd38 854a e2d8 8d81 803c 0ebf cd88

$sudo apt-key fingerprint 0ebfcd88

(3) Optional stable storage library,Not set,Is used automatically (deb [arch=amd64]

xenial stable)

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

(4) Update the 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. View the version you currently have installed

$sudo docker version

5. Go to the sudo command and set the user group

(1) Create a docker group

$sudo groupadd docker

(2) Add the current user to the docker user group

$sudo usermod -ag docker $user

(3) Log out and log in again

(4) whether the verification is successful

$docker run hello-world
  • Previous Java IO stream file encoding example code
  • Next MySQL green version setting encoding and 1067 error explanation