Setup Docker Community Engine on Ubuntu

Install Docker on Ubuntu

Docker Logo

We can easily setup our docker inside ubuntu. These commands can be used on Ubuntu 16.04 & 18.04. Type in terminal:

  • sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
  • curl -fsSL | sudo apt-key add -
  • Verify your key fingerprint 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88. Type sudo apt-key fingerprint 0EBFCD88 then check the image below.

Docker setup 1

  • sudo add-apt-repository "deb [arch=amd64] $(lsb_release -cs) stable"
  • sudo apt-get update
  • sudo apt-get install docker-ce docker-ce-cli docker-compose

After install configuration

After install docker, the system automatically creates a new user named docker And we need to run docker with sudo. So instead we use sudo to run docker, better add docker user to the default user group. Make sure you are default user (not root) then type:

  • sudo usermod -aG docker $USER
  • Log out and log back in so that your group membership is re-evaluated
  • And the last, type docker run hello-world to test your docker, it should be displaying like image below

Docker setup 2

Read also: How To Display Image With URL in Odoo