How to install docker CE on Ubuntu 18.04 (community version)

Time:2020-3-25

Uninstall old version

If you previously installed an older version, you need to uninstall:


$ sudo apt-get remove docker docker-engine docker.io containerd runc

Set up warehouse

To updateaptPackage index:


$ sudo apt-get update

Give WayaptAble to use the warehouse through HTTPS:


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

Add official GPG key:


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

Verify your key:


$ sudo apt-key fingerprint 0EBFCD88

Set which version to choose.


$ sudo add-apt-repository \
  "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) \
  test"

I chose the test version.

install

To updateaptPacket index


$ sudo apt-get update

Start installation


$ sudo apt-get install docker-ce docker-ce-cli containerd.io

test


$ sudo docker run hello-world

Reference resources

Get Docker Engine – Coummuntiy for Ubuntu

The above is the whole content of this article. I hope it will help you in your study, and I hope you can support developepaer more.