How To Install Docker on Ubuntu 19.04

Introduction

Docker is an application that makes it simple and easy to run application processes in a container, which are like virtual machines, only more portable, more resource-friendly, and more dependent on the host operating system.

Installing Docker

sudo apt-get update
apt-cache policy docker-ce
sudo apt-get install -y docker-ce
sudo systemctl status docker

Executing the Docker Command Without Sudo (Optional)

By default, running the docker command requires root privileges — that is, you have to prefix the command with sudo. It can also be run by a user in the docker group, which is automatically created during the installation of Docker. If you attempt to run the docker command without prefixing it withsudoor without being in the docker group, you'll get an output like this:

docker: Cannot connect to the Docker daemon. Is the docker daemon running on this host?.
See 'docker run --help'.
sudo usermod -aG docker ${USER}
su ${USER}
id -nG
username sudo docker
sudo usermod -aG docker username

Run Docker Containers (Optional)

Run a docker container using the docker run command to download and start the container.

docker run hello-world

Here are some interesting tutorials for you to get started:

Like to learn?

Follow me on twitter where I post all about the latest and greatest AI, DevOps, VR/AR, Technology, and Science! Connect with me on LinkedIn too!