Following the steps below will let you realize that installing Docker on Ubuntu 19.04 is not that hard as it seems, so let’s see how you can do it.
Prerequisites
- Ubuntu 19.04
- sudo privileges
Install Docker
As a first step you need to update the system packages.
sudo apt-get update
If there are some packages installed you can get rid of them with.
sudo apt remove docker docker-engine docker.io containerd runc
You need to import repository GPG key.
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Now we will add the Docker CE repository to Ubuntu.
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
To install Docker CE on Ubuntu 19.04, run:
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io
You can verify the installation with:
sudo docker version
We can also check if the Docker daemon is started with the following command:
sudo systemctl status docker
Output:
docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2019-12-13 23:27:50 CET; 9min ago
Docs: https://docs.docker.com
Main PID: 9941 (dockerd)
Tasks: 13
CGroup: /system.slice/docker.service
└─9941 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
Docker command
If you want to check all available subcommands, run:
sudo docker
Also, if you want to check the system information about Docker, run:
sudo docker info
To check only the space available for the Docker containers on your machine, execute:
sudo docker info | grep "Data Space"
Conclusion
In this tutorial we’ve shown you how to install Docker on Ubuntu 19.04 and if you have some further questions please put a comment in the box below. Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.