Technoracle
    Facebook Twitter Instagram
    • Sitemap
    • Privacy Policy
    • Disclaimer
    • Term of Services
    Facebook Twitter Instagram Pinterest Vimeo
    TechnoracleTechnoracle
    • Tutorials
      • Amazon Cloud
      • Google Cloud
    • How To
    • Blog
    • About
    Subscribe
    Technoracle
    Home»How To»How to Install Docker on Ubuntu 20.04 Easily
    How To

    How to Install Docker on Ubuntu 20.04 Easily

    Rajesh ShivamBy Rajesh ShivamJune 30, 2021No Comments3 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
    install Docker on Ubuntu 20.04
    Share
    Facebook Twitter LinkedIn Pinterest Email

    Docker is an open-source containerization platform built on Linux. According to a stackoverflow recent survey, Docker is loved by more than 73 percent of developers. In this article, learn how to install Docker on Ubuntu 20.04.

    Docker allows you to quickly build, test, and deploy applications as portable containers that can run virtually anywhere. A container represents a runtime for a single application and includes everything the software needs to run. Docker containers can easily ship to the remote location on start there without making the entire application setup.

    Docker can be installed from the Ubuntu repositories, but the downloading version may not be the latest. Alternatively, you can install Docker by adding the PPA to the system provided by Docker official site. In this tutorial, we will install docker using PPA.

    Page Contents

    • Docker Key Features
    • Prerequisites
    • Installation Steps
      • Step 1: Update the System with Dependencies Download
      • Step 2: Install Docker on Ubuntu 20.04
      • Step 3: Managing Docker Services
    • Verify Docker Installation
    • Uninstalling Docker
    • Conclusion

    Docker Key Features

    • Consistent and Isolated Environment
    • Cost-effectiveness with Fast Deployment
    • Mobility – Ability to Run Anywhere
    • Repeatability and Automation
    • Test, Roll Back and Deploy
    • Collaboration, Modularity and Scaling

    Prerequisites

    • Ubuntu 20.04 LTS Focal Fossa.
    • A user with SUDO privileges.

    Installation Steps

    Step 1: Update the System with Dependencies Download

    First update the system repositories with all the dependencies to install the Docker container by following commands.

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

    Step 2: Install Docker on Ubuntu 20.04

    Now, import GPG Key to verify the signature before installation. To import, run the following curl command.

    $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add

    Output should be

    ok

    After adding the GPG, add the Docker repositories on the Ubuntu system. It is a mandatory step to install a Docker container.

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

    Once the docker repository is added to the system, you can install docker on Ubuntu 20.04 by running the following commands.

    $ sudo apt update 
    $ sudo apt install docker-ce docker-ce-cli containerd.io

    Hurray, you have successfully installed Docker on Ubuntu 20.04. After the installation is completed, docker will be started automatically.

    To check the docker status, run the following command.

    $ sudo systemctl status docker

    Output should be something like this

    docker status check

    Step 3: Managing Docker Services

    Docker is managed by systemd daemon. Like other Ubuntu services, you can start, stop, restart docker services using the following commands.

    $ sudo systemctl stop docker
    $ sudo systemctl start docker
    $ sudo systemctl restart docker

    Verify Docker Installation

    After Docker installation on Ubuntu, check the installation by running a hello world example to make sure everything is running smoothly. To run Docker hello world example, open a terminal and type

    $ sudo docker container run hello-world

    You should see something like below

    install Docker on Ubuntu

    Uninstalling Docker

    Run the following commands to stop all running containers and remove all docker objects.

    $ docker container stop $(docker container ls -aq)
    $ docker system prune -a --volumes

    Now, uninstall Docker by following command.

    $ sudo apt purge docker-ce
    $ sudo apt autoremove

    Conclusion

    In this tutorial, you have learned how to install Docker on Ubuntu 20.04. If you have any doubts feel free to contact me, I will definitely try to help you. Also, you can join our elite Facebook group to get direct help from me. If you like this tutorial, please share this article on your social media handle.

    install docker ubuntu tips
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleHow to Install Vim on Ubuntu Easily [3 steps]
    Next Article How to Host Websites on GitHub for Free
    Rajesh Shivam

    Hello, everyone, I am Rajesh Shivam, I am a full-time freelancer with more than seven years plus experience in different freelancing platforms, in this blog, I am going to provide complete freelancing tips and tricks.

    Related Posts

    How To

    How to Install Microsoft Teams on Ubuntu 22.04 Easily

    February 22, 2023
    Read More
    How To

    What is Elastic IP and Its Pricing in AWS

    February 22, 2023
    Read More
    How To

    How to Convert PEM to PPK file [Step by Step Guide]

    February 22, 2023
    Read More
    Add A Comment

    Leave A Reply Cancel Reply

    Facebook Twitter Instagram Pinterest
    © 2023 Technoracle

    Type above and press Enter to search. Press Esc to cancel.

    Go to mobile version