How to install docker on Ubuntu 19.04

What is docker?

Docker is basically a container engine which uses the Linux Kernel in order to create the containers on top of an operating system. Which is use to create, deploy and run the applications

Update packages

  sudo apt update -y

Install basic dependencies

  sudo apt -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common


  Preparing to unpack .../apt-transport-https_1.8.3_all.deb ...
  Unpacking apt-transport-https (1.8.3) ...
  Selecting previously unselected package gnupg-agent.
  Preparing to unpack .../gnupg-agent_2.2.12-1ubuntu3_all.deb ...
  Unpacking gnupg-agent (2.2.12-1ubuntu3) ...
  Setting up apt-transport-https (1.8.3) ...
  Setting up gnupg-agent (2.2.12-1ubuntu3) ...

Import docker repository GPG key

  curl -fsSL | sudo apt-key add -



Add Docker CE repository

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


Get:1 disco InRelease [44.4 kB]
Hit:2 disco InRelease
Get:3 disco/stable amd64 Packages [3,563 B]
Hit:4 disco-updates InRelease
Hit:5 disco-backports InRelease
Hit:6 disco-security InRelease
Fetched 48.0 kB in 1s (43.4 kB/s)
Reading package lists... Done

Install Docker CE

  sudo apt -y install docker-ce docker-ce-cli


  Setting up pigz (2.4-1) ...
  Setting up cgroupfs-mount (1.4) ...
  Setting up docker-ce (5:19.03.3~3-0~ubuntu-disco) ...
  Created symlink /etc/systemd/system/ → /lib/systemd/system/docker.service.
  Created symlink /etc/systemd/system/ → /lib/systemd/system/docker.socket.
  Processing triggers for systemd (240-6ubuntu5.8) ...
  Processing triggers for man-db (2.8.5-2) ...
  Processing triggers for libc-bin (2.29-0ubuntu2) ...

Check Docker service.

systemctl status docker


  ● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2019-11-30 12:06:54 UTC; 1min 28s ago
   Main PID: 9478 (dockerd)
      Tasks: 10
     Memory: 38.1M
     CGroup: /system.slice/docker.service
             └─9478 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

  Nov 30 12:06:54 dockerd[9478]: time="2019-11-30T12:06:54.340566631Z" level=warning msg="Your kernel does not support cgrou
  Nov 30 12:06:54 dockerd[9478]: time="2019-11-30T12:06:54.340586530Z" level=warning msg="Your kernel does not support cgrou
  Nov 30 12:06:54 dockerd[9478]: time="2019-11-30T12:06:54.340597409Z" level=warning msg="Your kernel does not support cgrou
  Nov 30 12:06:54 dockerd[9478]: time="2019-11-30T12:06:54.341867491Z" level=info msg="Loading containers: start."
  Nov 30 12:06:54 dockerd[9478]: time="2019-11-30T12:06:54.622845883Z" level=info msg="Default bridge (docker0) is assigned
  Nov 30 12:06:54 dockerd[9478]: time="2019-11-30T12:06:54.761684393Z" level=info msg="Loading containers: done."
  Nov 30 12:06:54 dockerd[9478]: time="2019-11-30T12:06:54.848251454Z" level=info msg="Docker daemon" commit=a872fc2f86 grap
  Nov 30 12:06:54 dockerd[9478]: time="2019-11-30T12:06:54.849149468Z" level=info msg="Daemon has completed initialization"
  Nov 30 12:06:54 dockerd[9478]: time="2019-11-30T12:06:54.879129236Z" level=info msg="API listen on /var/run/docker.sock"
  Nov 30 12:06:54 systemd[1]: Started Docker Application Container Engine.