Docker installation for ubuntu

Install repository

sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \

Add Docker’s official GPG key

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

Update the apt package inde

sudo apt-get update

Install docker-ce

sudo apt-get install docker-ce

Verify that docker is installed

sudo docker run hello-world

Run ubuntu image with bash

sudo docker run -it ubuntu bash

Manage Docker as a non-root user

sudo groupadd docker
sudo usermod -aG docker $USER

Configure Docker to start on boot

sudo systemctl enable docker

To disable this behavior, use disable instead.

sudo systemctl disable docker



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s