Install Docker on Ubuntu 20.04 – Tutorial
Docker is an open-source containerization platform that allows you to quickly build, test, and deploy applications as portable containers that can run virtually anywhere. A container represents a runtime for a single application and includes everything the software needs to run.
Docker is an integral part of modern software development and DevOps continuous integration and deployment pipelines.
This tutorial covers how to install Docker on an Ubuntu 20.04 machine.
Docker is available for installation from the standard Ubuntu 20.04 repositories, but it may not always be the latest version. We’ll install the latest Docker package from the official Docker’s repositories.
Login to your Ubuntu 20.04 system with sudo privileged user. Then run the following commands to install required packages.
Install Docker on Ubuntu:
First of all, import the GPG key to yoru system to verify packages signature before installing them. To import key run the below command on terminal.
After that add the Docker repository on your Ubuntu system which contains Docker packages including its dependencies. You must have to enable this repository to install Docker on Ubuntu
Your system is now ready for Docker installation. Run the following commands to upgrade apt index and then install Docker community edition on Ubuntu.
Install Docker Compose
After successful installation of Docker community edition, the service will start automatically, Use below command to verify service status
The output will look something like this
Manage Docker Service:
Use below command to stop, start or restart Docker service:
Run Docker Hello World
Once you completed the Docker service installation on your Ubuntu system. Run a hello world example to verify everything is fine.
To verify, open a terminal and type
Install Docker Compose:
Download the latest version of Docker compose tool from Github. Use the below commands to download and install Docker compose . Before installing make sure compatibility with your docker version
Mildaintrainings offer you Docker Training course which is designed by Devops Subject Matter Experts to help you understand Docker concepts and perform handson docker operations. Enroll and get Certified Now.