NEW LOCATION

Olá Brazil Brazil NVMe-powered VPS Plans in Brazil Now Available.

Deploy Instantly
  • +357 2425 0808
  • Login
  • 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!

Press Releases
75

Free VPS Trial

No Credit Card Required.

Recent Posts

The Critical Role of Server Time Synchronization in MetaTrader 5 (MT5) Cluster

The Critical Role of Server Time Synchronization in MetaTrader 5 (MT5) Cluster

04 September, 2024

NetShop ISP Expands Global Cloud Footprint in São Paulo, Brazil (LatAm)

NetShop ISP Expands Global Cloud Footprint in São Paulo, Brazil (LatAm)

30 August, 2024

Microsoft Security Alert: Zero-Click IPv6 Vulnerability on Windows Servers [CVE-2024-38063]

Microsoft Security Alert: Zero-Click IPv6 Vulnerability on Windows Servers [CVE-2024-38063]

17 August, 2024

How To Connect (RDP) on Windows Server 2022 from Linux Ubuntu PC

How To Connect (RDP) on Windows Server 2022 from Linux Ubuntu PC

16 August, 2024

Web Hosting Choice Criteria for Software Development Companies

Web Hosting Choice Criteria for Software Development Companies

09 August, 2024

#letushostyou

Award Winning Hosting Provider established in 2004.

120 Faneromenis Avenue, Imperial Tower, 2nd Floor, Larnaca 6031, Cyprus

Products

Bare Metal Servers

Customized Servers

Virtual / Cloud Servers

Forex VPS

Storage VPS

cPanel Web Hosting

Reseller Web Hosting

Colocation

Addons

Premium DNS

Email Hosting

Cloud Backup

DDoS Protection

Licenses

SSL Certificates

Domain Names

Premium SLAs

About Us

Data Center Locations

Looking Glass

Our Company

Contact Us

Careers in Cyprus

Become a Partner

Awards

Certifications

© 2024 S.S. NetShop Internet Services Ltd. All rights reserved.  Terms & Conditions  |  Privacy Policy
CY Reg. Number: HE 217340 | EU VAT Number: CY10217340J

Visa
Mastercard
PayPal
Bitcoin
Tether
Ethereum
Litecoin
Wise
Revolut
Wire Transfer