Install Docker on Ubuntu
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 https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- Verify your key fingerprint
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
. Typesudo apt-key fingerprint 0EBFCD88
then check the image below.
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io 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
Read also: How To Display Image With URL in Odoo