The Easiest Way to Install Docker on Ubuntu

In this guide, we’ll show you the easiest way to install Docker on Ubuntu. If you’re looking to get started with Docker on Ubuntu, you’re in the right place!

A streamlining the setup process so you can quickly leverage Docker’s powerful containerization features. Whether you’re new to Docker or just want a hassle-free installation, follow these steps to have Docker up and running in no time.

Install Docker on Ubuntu

Option 1: Installing Docker from the Official Repository

Step 1: Updating the Software Repository

To begin, launch a terminal window, then update the local repository:

sudo apt update

Wait for the process to complete.

Step 2: Downloading Dependencies

Run the following commands to enable HTTPS access to the Docker repositories on your Ubuntu 20.04 system:

sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
The above-mentioned command:

• Permits file and data transfers over https for the package manager.
Permits security certificate verification by the system.
• Installs curl, a tool for transferring data.
• Adds scripts for managing software.

Step 3: Adding Docker’s GPG Key

Add the GPG key after that to confirm the software package’s legitimacy:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add –

Step 4: Installing the Docker Repository

Now install the Docker repository using the command:

sudo add-apt-repository “deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable”

The command installs the latest repository for your specific Ubuntu release (in this case, 20.04 Focal Fossa).

Step 5: Installing the Latest Docker

Start by updating the repository again:

sudo apt update

Now you can install the latest Docker version with:

sudo apt-get install docker-ce

Step 6: Verifying Docker Installation

To verify the installation, verify the Docker version:

docker –version

It should show the Docker version, as in the image above.

Step 7: Enable Docker Service

Use these commands to launch the Docker service:

sudo systemctl start docker

Enable Docker to run at startup with:

sudo systemctl enable docker

Option 2: Installing Docker from Default Repositories

Step 1: Updating the Local Repository

Open a terminal window and update the local repository with:

sudo apt update

Step 2: Uninstalling Old Docker Versions

Before installing the software, make sure you remove any old Docker packages on your Ubuntu 20.04 by running the command:

sudo apt-get remove docker docker-engine docker.io

Step 3: Installing Docker

Now let’s install Docker on Ubuntu 20.04. Enter the following command in the window of the terminal:

sudo apt install docker.io

Input y and hit Enter to validate the installation. Once the installation is completed, the output notifies you Docker has been installed.

Step 4: Checking Docker Installation

To verify the installation, check the Docker version:

docker –version

Get Flat 65%OFF on Yearly Server Hosting Plans

For Promocode Connect to sales team

Read More Related Blog post here: https://blog.vcclhosting.com/installing-nginx-on-ubuntu-an-easy-guide/: The Easiest Way to Install Docker on Ubuntu

Scroll to Top