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
79

Free VPS Trial

No Credit Card Required.

Recent Posts

Black Friday & Cyber Monday Offer – 30% Lifetime Discount on VPS Plans

Black Friday & Cyber Monday Offer – 30% Lifetime Discount on VPS Plans

02 December, 2024

How To Install Sendy on Ubuntu 22.04 Server

How To Install Sendy on Ubuntu 22.04 Server

27 November, 2024

How To Extract Certificates and Private Key from .PFX file

How To Extract Certificates and Private Key from .PFX file

19 November, 2024

NetShop ISP CEO Stefano Sordini to Moderate Key Panel on Forex AI Automation at Cyprus Fintech Summit 2024

NetShop ISP CEO Stefano Sordini to Moderate Key Panel on Forex AI Automation at Cyprus Fintech Summit 2024

15 November, 2024

Preparing for the Daylight Saving Time (DST) Change: Essential Updates for MetaTrader 4/5 Platforms

Preparing for the Daylight Saving Time (DST) Change: Essential Updates for MetaTrader 4/5 Platforms

25 October, 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