Docker Installation on Ubuntu

Docker installation system requirements

In order to install docker Ubuntu, you will need to meet the following requirements:

  • OS: Linux Ubuntu
  • Memory: 512MB RAM (2GB Recommended)
  • A sufficient amount of disk and CPU (Dependant on the applications )
  • It only works on a 64-bit Linux installation.
  • It requires Linux kernel version 3.10 or higher.

i) Check the current kernel version

$ uname -r

ii) Check the current Ubuntu version

$ lsb_release -a

iii) Check if ubuntu is running on 32-bit or 64-bit

$ uname -a

Steps to install docker on Ubuntu

Step 1) To install Docker, we need to use the Docker team’s DEB packages.

Use the below command to install prerequisite Ubuntu packages

$ sudo apt-get install apt-transport-https ca-certificates curl software-properties-common

Step 2) Add the official Docker GPG key with the fingerprint.

$ curl -fsSL | sudo apt-key add -

Step 3) Next, Add the Docker APT repository.

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

Step 4) Update APT sources using the below Docker command

$ sudo apt-get update

We can now install the Docker package itself.

Step 5) Now, start installing the Docker packages on Ubuntu using the below Docker command

$ sudo apt-get install docker-ce

Step 6) Check the docker version

$ docker --version 

Step 7) Check the docker service by running the following command.

$ systemctl status docker

Optional, If you want to run docker as a non-root user then you need to add it to the docker group.

Step 8) Create the docker group if it does not exist

$ sudo groupadd docker

Step 9) Add your user to the docker group.

$ sudo usermod -aG docker $USER

Step 10) Run the following command to activate the changes to groups

$ newgrp docker

Step 11) Check if docker can be run without root

$ docker run hello-world

Reboot if still got an error

$ reboot


Docker installation —

Docker post-installation —




DevOps Engineer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Superseding With DevOps

Tabletop Simulator Poker


Ubuntu 20.04 linking with Nvidia graphic card

Python chapter 2: Lists in Python


Back in the lab…

CS371g Final Entry

Displaying AWS ECS Fargate logs in Airflow UI

CloudWatch Fargate logs

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


DevOps Engineer

More from Medium

The Host Network Driver | Networking in Docker #5

Automating Shell Script with ‘Expect’

How to backup and clone your Jenkins Instance

Docker & Nginx & Logs