how to install docker on ubuntu

Install Docker on Ubuntu 18.04/16.04

to install docker on Ubuntu 18.04/16.04 or to install docker on Debian, we need to follow two steps. one is setup the repository and second one is installing the docker. in the following steps i will show you how to install docker on Ubuntu 18.04/16.04/Debian step by step. for the installation of  Docker CE, you need the 64-bit version Ubuntu.

to install docker on Ubuntu 18.04/16.04 or to install docker on Debian run the following commands.

Setup Repository:

Check List of  The Docker Versions Available:

you can see in the image different versions of docker.
how to install docker on ubuntu

Install Docker on ubuntu 18.04/16.04 -Latest Version:

it will install the latest version of docker available in your repo list that is top one in the list. in my case it is 18.06.1~ce~3-0~ubuntu.

Install Specific Version Of Docker:

from above  list you can select your version

this will install 17.09.0~ce-0~ubuntu docker version

Use Docker With Non-Root User:

If you want to use docker with non root user you must add that user to docker group. You can see in the below image i executed  docker command with devops user but it is showing permission denied. For that we have to add devops user to docker group.

Docker Install Ubuntu-Install Docker Debian

Docker Install Ubuntu-Install Docker Debian

now you can run docker commands

Install Docker on Ubuntu 18.04/16.04 With Script:

if you want to install the docker with one simple script use below command.

you can find official documentation here https://docs.docker.com/install/linux/docker-ce/ubuntu/

  • install docker linux
  • docker install
  • docker install Debian
  • install docker ce Ubuntu
  • install docker ubuntu 18