UPCOMING EVENT

Let's Meet during iFX EXPO International 2024 in Limassol, Cyprus (18-20 June)

Book a Meeting
  • +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
74

Free VPS Trial

No Credit Card Required.

Recent Posts

MT5 Access Server for Forex Brokers: Virtual vs. Dedicated

MT5 Access Server for Forex Brokers: Virtual vs. Dedicated

14 June, 2024

How To Extend Root Partition using Home Partition space in CentOS

How To Extend Root Partition using Home Partition space in CentOS

30 May, 2024

NetShop ISP to Attend iFX EXPO International 2024 and Announce Global Infrastructure Expansion

NetShop ISP to Attend iFX EXPO International 2024 and Announce Global Infrastructure Expansion

23 May, 2024

TNFX Broker Partners with NetShop ISP to Offer Low-Latency Forex VPS to Traders

TNFX Broker Partners with NetShop ISP to Offer Low-Latency Forex VPS to Traders

14 May, 2024

How to Install Nginx, MySQL, PHP on Ubuntu 22.04 (LEMP)

How to Install Nginx, MySQL, PHP on Ubuntu 22.04 (LEMP)

10 May, 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
Revolut
Wire Transfer