How to install Docker in Ubuntu 18.04: Docker is containerization application. Containers are platforms that let you run your applications in resource-isolated processes.
Unlike virtual machines that you create in Virtual Box, containerization applications like Docker provide more portability, user-friendliness, and closeness to the host operating system and its resources.
Here in this post, I am going to share how you can install docker in Ubuntu 18.04.
sudo apt update sudo apt install apt-transport-https ca-certificates curl software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" sudo apt update apt-cache policy docker-ce
Understanding the Commands
- The first command updates the existing packages.
- The second command installs prerequisite packages which let apt use packages over HTTPS
- Then add the GPG key for the official Docker repository to your system.
- Add the Docker repository to apt sources.
- Update the packages repository
- Make sure that the Docker gets installed from Docker repo, not from cache.
Now you are ready to install Docker. The following to commands will help you to install and check the status of the docker service respectively.
sudo apt install docker-ce sudo systemctl status docker
How to Install Docker in Ubuntu 18.04 Cheat-sheet