🇮🇹 Meet NetShop ISP at the SiGMA World Expo in Rome (2-5 Nov) | Booth 8028

English

Home

Blog

How To Install Docker on Ubuntu Server (...

How To Install Docker on Ubuntu Server (3 Easy Steps)

How To Install Docker on Ubuntu Server (3 Easy Steps)

NetShop ISP

NetShop ISP · Blog Author

Jul 11, 2023 · Technical Tutorials

In this article we will demonstrate the steps you need to execute on your Ubuntu server to install and run Docker on your machine.

Docker is an open platform for developing, shipping, and running applications. It enables you to separate your applications from your infrastructure so you can deliver software quickly. In simple words, Docker is a cost-effective alternative to hypervisor-based virtual machines. You setup you desired applications and recipes in containers which you can then deploy in a single click.

Steps to Install Docker Engine on Ubuntu Server via apt repository

Requirements & Pre-requisites

  • Virtual machine or Dedicated server
  • Works only on Ubuntu Focal 20.04, Ubuntu Jammy 22.04, Ubuntu Kinetic 22.10 and Ubuntu Lunar 23.04
  • SSH access on your server with root or sudo user

Step 1. Update system and install required libraried

root@ubuntu:~$ apt-get update -y
root@ubuntu:~$ apt-get install ca-certificates curl gnupg -y

Now you need to add Docker’s official GPG key:

root@ubuntu:~$ install -m 0755 -d /etc/apt/keyrings
root@ubuntu:~$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
root@ubuntu:~$ chmod a+r /etc/apt/keyrings/docker.gpg

Execute the following command to setup the Docker repository for Ubuntu:

root@ubuntu:~$ echo \
  "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null

Step 2. Install Docker Engine

Once the Docker repository is installed from previous step, execute the following command to update your system:

root@ubuntu:~$ apt-get update -y

Now, let’s install Docker engine, containerd and Docker Compose:

root@ubuntu:~$ apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y

Step 3. Verify Successful Installation (optional)

At this point you will want to verify that Docker has been successfully installed on your Ubuntu server.

The following command will download a test image and run it as a container. Once the container runs, will print a confirmation message.

root@ubuntu:~$ docker run hello-world

You should see an output similar to this:

Docker hello world successful output

Congratulations! You have successfully installed Docker engine on Ubuntu server!

docker
how to
tutorials
Press Releases
99

Free VPS Trial

No Credit Card Required.

Start Your VPS Hosting Free Trial

Recent Posts

Understanding PHP2Shell, the Critical PHP RCE Exploit - How To Patch Instructions

Understanding PHP2Shell, the Critical PHP RCE Exploit – How To Patch Instructions

23 October 2026

Critical PHP Vulnerabilities (CVE-2026-109618 & CVE-2026-109619): Update Your Servers Now

Critical PHP Vulnerabilities (CVE-2026-109618 & CVE-2026-109619): Update Your Servers Now

21 October 2026

NetShop ISP Exhibits at SiGMA World 2026

NetShop ISP Exhibits at SiGMA World 2026 in Rome and Hosts Forex Discussion Panel

21 October 2026

Why cPanel Hosting Remains the Most Reliable Choice for Business Websites in 2026

Why cPanel Hosting Remains the Most Reliable Choice for Business Websites in 2026

12 October 2026

Brazil Pulls the Plug on Online Betting

Brazil Pulls the Plug on Online Betting

26 September 2026