Docker----Start (2)----Install the latest version of Docker CE on Ubuntu

Source: Internet
Author: User
Tags curl docker ps

Previously wrote an article about Docker installation blog, when recently used again, in the official Docker document found the latest version of the Docker (V18.03) installation method and a little bit different, some commands found to be useless. (really is a day do not study, will be beaten AH). Specific and before the same command or place, I'll mark it as Red

According to the official website, the old version of Docker is called Docker or docker-engine. If you want to install a new version, you need to uninstall the previous version, using the command:

$ sudo apt-get remove Docker docker-engine Docker.io

It is recommended to start installing the latest version of this command first, regardless of whether it was installed before.

Official website, install Docker There are a number of ways, I will record my installation method (install using the repository), the specific installation steps are as follows:

First, create a warehouse

1. Update

sudo apt-get update

2. Install the HTTPS certificate

sudo apt-get install     apt-transport-https     ca-certificates     Curl     Software-properties-common   # This has not been used in the previous process.

3. Add Gpgkey

Curl-fssl HTTPS://DOWNLOAD.DOCKER.COM/LINUX/UBUNTU/GPG | sudo apt-key add-

4. Use the following command to check your

sudo apt-key fingerprint 0ebfcd88

The output is as follows:

Pub   4096r/0ebfcd88 2017-02-22      Key fingerprint = 9dc8 5822 9fc7 DD38 854A  e2d8 8d81 803C 0EBF cd88uid                  Dock Er Release (CE deb) <[email protected]>sub   4096r/f273fcd8 2017-02-22

Second, start the installation

  Before using the Apt-get install Docker.io, you are now using Apt-get install Docker-ce

sudo apt-get updatesudo apt-get install docker-ce

Third, after the installation is complete, add the No-root user added (reason can refer to the previous article)

Use the following command:

sudo groupadd docker     #添加docker用户组sudo gpasswd-a $USER Docker     #将登陆用户 #user join the Docker user group Newgrp Docker     # Update user groups Docker PS    #测试docker命令是否可以使用sudo正常使用

When I use the previous command to add a user (myusername), I get the following error when I log in with the MyUserName identity:

Got Permission denied while trying to connect to the Docker daemon sockets at Unix:///var/run/docker.sock:get Http://%2Fva R%2frun%2fdocker.sock/v1.38/version:dial Unix/var/run/docker.sock:connect:permission denied

Thank you very much for this article Warm3snow.

After that, you can use Docker successfully.

Docker----Start (2)----Install the latest version of Docker CE 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.