NaijaknowhowNaijaknowhowNaijaknowhow
  • Home
  • Guides
  • Apps & Software
  • Tech News
  • Phones
    • iPhone
    • Infinix
    • Nokia
    • OPPO
    • Samsung
    • TECNO
    • Xiaomi
    • More Phones
      • HONOR
      • Huawei
      • Gionee
      • Innjoo
      • itel
      • LEAGOO
      • Lenovo
      • LG
      • Motorola
      • Sony
      • Vivo
      • Other Smartphones
  • More
    • Internet & data
      • Telcos
      • Internet & Data
      • Call Tariffs
    • Operating System
      • Android
      • Apple iOS
      • iPadOS
      • macOS
      • Windows
    • Banking & Finance
    • Buying Guide
    • Computers
    • Gaming
    • Video Tutorial
    • Gadgets
    • Accessories
    • Online Business
    • Wearables
    • Featured
  • Advertise
  • Contact Us
  • My Bookmarks
Search
  • Customize Interests
  • About Us
  • Contact
  • Advertise
© NAIJAKNOWHOW MEDIA
Notification Show More
Font ResizerAa
NaijaknowhowNaijaknowhow
Font ResizerAa
Search
  • Home
  • Guides
  • Apps & Software
  • Tech News
  • Phones
    • iPhone
    • Infinix
    • Nokia
    • OPPO
    • Samsung
    • TECNO
    • Xiaomi
    • More Phones
  • More
    • Internet & data
    • Operating System
    • Banking & Finance
    • Buying Guide
    • Computers
    • Gaming
    • Video Tutorial
    • Gadgets
    • Accessories
    • Online Business
    • Wearables
    • Featured
  • Advertise
  • Contact Us
  • My Bookmarks
Follow US
  • About Us
  • Advertise
  • Banner Ads
  • Contact Us
  • Privacy Policy
  • Disclaimer
© NAIJAKNOWHOW MEDIA
FeaturedTech Tutor

Installing Docker on Ubuntu: A Step-by-Step Guide

By
Naijaknowhow Team
Last updated: April 26, 2022
Share
6 Min Read
SHARE

Ubuntu is a popular Linux distribution for developers to streamline code and deployment activities. In this post, we shall be looking at how to install Docker on Ubuntu and leverage the capabilities of Docker as a containerization platform. Docker is a popular application to build and deploy containers, in contrast to virtual machines which are bulkier and less manageable. Docker has thus revolutionized the DevOps process.

Contents
  • Before You Begin
  • Installing Docker on Ubuntu
    • 1. Update your packages in the repository
    • 2. Enable fetch packages over HTTPS
    • 3. Adding Docker Repository to APT sources
    • 4. Installing Docker
    • 5. Verifying Docker Installation
  • Hello World using Docker
  • Conclusion

Before You Begin

This post assumes you are working on Ubuntu and have it installed.  It does not matter which Ubuntu distribution you are using but having any LTS version or latest version is preferred. Also, it is necessary to have sudo privileges on Ubuntu users.

It is also required that you have a basic understanding of Docker and how it works. You will need to understand Docker images and containers. Docker supports registries such as the JFrog registry, from where you can download and utilize the images. Docker Hub is also another registry where you can download the images. Make sure you have an account on any registry.

Installing Docker on Ubuntu

To install Docker on Ubuntu, you must follow the below steps:

  1. Update your packages in the repository
  2. Enable fetch packages over HTTPS
  3. Adding Docker repository to the APT sources
  4. Installing docker
  5. Verifying Installation

1. Update your packages in the repository

It is always recommended to update the packages in the repository so that you are using stable code and have updated security packages.

Also Read:  Blackview XPLORE 2 Projector: The World’s First 3.2K 5G Rugged Armor Flagship with Built-in High-Precision Projector is Coming Soon

Ubuntu uses APT to store and install the software.

sudo apt update

2. Enable fetch packages over HTTPS

HTTPS is a preferred protocol for only transfers. This ensures that your connection is secured and encrypted. To install Docker, you need to have packages installed on HTTPS. Run the below command to enable HTTPS:

sudo apt install apt-transport-https ca-certificates curl software-properties-common

3. Adding Docker Repository to APT sources

You need to add the Docker repository to the APT sources. This will enable APT to access the Docker repository and download sources. To add Docker repository to APT sources run the below command:

sudo add-apt-repository "deb [arch=amd64]
https://download.docker.com/linux/ubuntu bionic stable"

4. Installing Docker

To install the Docker, first update the Docker packages:

sudo apt update

Install Docker from the Docker repo instead of the default Ubuntu repo:

apt-cache policy docker-ce

Finally, install Docker using the below command:

sudo apt install docker-ce

5. Verifying Docker Installation

We have completed all the steps needed to install the Docker. Docker must be installed, daemon service started, and the Docker process starts on boot. Check this by running the command below:

sudo systemctl status docker

Hello World using Docker

There is another interesting way to make sure that the Docker is up and running. This is by running the Hello World image in Docker. Docker image is a blueprint that is used to build Docker containers of the application. Docker containers are built from Docker images. By default, Docker pulls these images from Docker Hub, a Docker registry managed by Docker. Docker Hub is open to everyone to upload their images. Most applications and Linux Distributions are hosted there, ready to be used. To check whether you can access and download images from Docker Hub, run the below command:

Also Read:  How to Convert Airtime to Cash in Nigeria (All Networks)

In your terminal, run the below command:

docker run hello-world

Now, the Docker will first try to find the image locally. If it cannot find the image locally, it will proceed to download the image from the remote repository. Now since this image is lightweight, it will not take much time to download, however, for heaver images, download can be time-consuming.

Once the download has been done, and the container has been made, you will see the below output:

Hello from Docker!
This message shows that your installation appears to be working correctly.

You can also create your images and publish them on Docker Hub. You can even set up a Docker repository. Publishing the images online helps in sharing your work with others and also makes the images manageable. Docker also supports tagging the images. This means that in the remote repository, you can have different versions and when downloading the image, you can specify the version you want to use. This is very similar to Git versioning if you have experience with version control using Git.

Conclusion

This was a bit lengthy post, but we learned how to install Docker on Ubuntu. Both Ubuntu and Docker are popular with the developers and their combined stack can simplify your development cycle and cut infrastructure costs, as in the case of Virtual Machines.

Best Telegram Bots That You Should Know (2023)
How to Turn Off Message Requests on Facebook (2023)
Why It’s So Hard To Implement Organizational Change and a Few Tips To Do It Right
How to Convert Gift Cards to Cash in Nigeria (iTunes, Amazon, Google Play, Steam and more)
How to Download Facebook Videos on Mobile & PC
TAGGED:DockerInstall Docker on UbuntuLinuxUbuntu
Share This Article
Facebook Whatsapp Whatsapp
Share
Naijaknowhow Icon
ByNaijaknowhow Team
Follow:
This is the profile of our team of prolific writers who create amazing tech-related content. The information contained on this website is for general information purposes only and does not represent the opinion of Naijaknowhow Media. Want to advertise on Naijaknowhow Media? Please click here to send a message.
Previous Article instagram How to Save IG Content: Instagram Video Download Methods
Next Article Vivo Y75 5G Vivo Y75 5G – Full Specifications and Price in Nigeria
2 Comments 2 Comments
  • Olabode spirit says:
    March 3, 2022 at 3:41 am

    Happy New months to my family and friends

    Reply
    • franklin victor Viklin says:
      March 3, 2022 at 7:44 pm

      Happy New Month to you too Olabode, wish you all the best this month. Cheers

      Reply

Hey fam, don't go without a reply!Cancel reply

Ad imageAd image
- Advertisement -

Latest News

patricia airtime to cash app
Best Apps/Platforms to Convert Airtime to Cash in Nigeria
Apps & Software
December 1, 2025
how to convert airtime to cash
How to Convert Airtime to Cash in Nigeria (All Networks)
Banking & Finance Tech Tutor Telcos
December 1, 2025
websites to play card games
Top Platforms to Play Classic and Modern Card Games Online
Gaming
November 26, 2025
Camera Ruler Apps
No Tape? No Problem! Try These AR & Camera Ruler Apps for Smartphone
Apps & Software
November 13, 2025

Stay Connected

5.9kFollowersLike
2.2kFollowersFollow
1.6kFollowersPin
1.2kFollowersFollow
1.9kSubscribersSubscribe
500FollowersFollow
637MembersFollow
NaijaknowhowNaijaknowhow
Follow US
© NAIJAKNOWHOW MEDIA (BN 2738473) | 2015 - 2025 All Rights Reserved.
  • About Us
  • Advertise
  • Banner Ads
  • Contact Us
  • Privacy Policy
  • Disclaimer
X
GET EXCLUSIVE CONTENT
SUBSCRIBE TO OUR CHANNEL