How to Install Docker On Ubuntu 18.04

Docker is a set of platform as a service products that uses OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels.

Most users set up Docker’s repositories and install from them, for ease of installation and upgrade tasks. This is the recommended approach.

OPTIONAL. Windows 10 Users

To install ubunu 18.04 on Windows 10 WSL, follow instructions below:

How To Install WSL on Windows 10

Step 1. Set Up The Repository

$ sudo apt-get update

$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \

$ curl -fsSL | sudo apt-key add -

$ sudo apt-key fingerprint 0EBFCD88    
pub   rsa4096 2017-02-22 [SCEA]
      9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
uid           [ unknown] Docker Release (CE deb) <>
sub   rsa4096 2017-02-22 [S]

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

Step 2. Install Docker Engine – Community

$ sudo apt-get update

$ sudo apt-get install docker-ce docker-ce-cli

Step 3. Post-Installation Steps for Linux

Manage Docker as a non-root user

$ sudo groupadd docker

$ sudo usermod -aG docker $USER

Log out and log back in

$ newgrp docker 

Configure Docker to start on boot

$ sudo systemctl enable docker

Useful Docker Commands

Top 10 Most Useful Docker Commands

1 reply

Comments are closed.