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


Uninstall old version

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

$ sudo apt-get remove docker docker-engine 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 \

Add official GPG key:

$ curl -fsSL | sudo apt-key add -

Verify your key:

$ sudo apt-key fingerprint 0EBFCD88

Set which version to choose.

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

I chose the test version.


To updateaptPacket index

$ sudo apt-get update

Start installation

$ sudo apt-get install docker-ce docker-ce-cli


$ 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.