How to Install Docker on Ubuntu | Comprehensive Guide

How to Install Docker on Ubuntu | Comprehensive Guide

How-to-Install-Docker-on-Ubuntu-ACTE

About author

Smita Jhingran (Big Data Engineer )

Smita Jhingran provides in-depth presentations on various big data technologies. She specializes in Docker, Hadoop, Microservices, MiNiFi, Cloudera, Commvault, and BI tools with 5+ years of experience.

Last updated on 07th Dec 2021| 1058

(5.0) | 19874 Ratings

    Install Docker Engine, changing the path below to the path where you downloaded the Docker package. $ sudo dpkg -i /path/to/package.

    • Introduction of docker on ubuntu
    • Pre-requisites of Docker Ubuntu
    • Ubuntu Installation on Oracle Virtual Box
    • The steps for downloading Ubuntu on Oracle Virtual box
    • Docker Installation Process on Ubuntu (Method 1)
    • Install Docker from Official Repository (Method 2)
    • Uninstall Procedure

    Subscribe For Free Demo

    [custom_views_post_title]

      Introduction of docker on ubuntu

      Docker is a platform that programs the utility and all its dependencies withinside the field in order that the utility works seamlessly. The Container makes the utility run its useful resource in an remoted procedure much like the digital machines, however it’s far greater portable.

    Docker on ubuntu
    Docker on ubuntu

      Pre-requisites of Docker Ubuntu

    • Audience:This academic is supposed for individuals who are inquisitive about gaining knowledge of Docker as a field service
    • System Requirements: Ubuntu 20.04 64-bit working system. (If Linux OS isn’t always in system, we are able to run docker the usage of Virtual Box, PFB the steps)
    • A consumer account with sudo privileges.
    • An account on Docker Hub to tug or push an picture from Hub.

      Ubuntu Installation on Oracle Virtual Box

    • If you need to apply Ubuntu 20.04 with out making any alternate to the Windows Operating device, you could continue with the Oracle Virtual box.
    • Virtual Box is loose and open-supply virtualization software program from Oracle. It permits you to put in different running structures in digital machines. It is suggested that the device have to have at the least 4GB of RAM to get first rate performances from the digital running device.

      The steps for downloading Ubuntu on Oracle Virtual box

      1. Navigate to the internet site of Oracle Virtual Box, down load the .exe file and get the trendy strong version:

      2. Once completed with downloading the digital field, we will navigate to and down load the Ubuntu disk image (.iso file) via way of means of clicking at the down load option.

      3. Once the down load has been finished for Ubuntu .iso file, open the digital field and click on on “New” gift on top.

      4. Enter the information of your digital system through giving any name, kind as “Linux ” and Version as Ubuntu (sixty four bit)

      5. Choose the memory (RAM ) that wishes to be allotted to the Virtual system and click on on Next. (I actually have selected 3000 MB)

      6. After the RAM allocation ,Click on Create a digital disk now. This serves because the tough disk of the digital Linux device. It is wherein the digital device will keep its files.

      7. Now, we need to pick out the Virtual Hard Disk.

      8. We can pick both the “Dynamically allotted” or the “Fixed length” choice for developing the digital tough disk.

      9. Finally, we have to specify our Ubuntu OS’s length. The endorsed length is 10 GB, however it may be elevated if required.

      10. Ubuntu OS is prepared to put in in Virtual Box, however earlier than beginning the Virtual system, we want to a make few adjustments in settings. Click on garage below the setting.

      11. Click on Empty below Controller IDE. Navigate to Attributes and skim the Optical Drive option.

      12. Choose the .iso document from the place wherein it’s miles downloaded. Once selected, click on on OK and begin the Virtual container with the aid of using clicking on begin gift at the Top menu.

      13. Click good enough and begin the machine.

      14. Proceed with “Install Ubuntu”.

      Course Curriculum

      Learn Advanced Docker Certification Training Course to Build Your Skills

      Weekday / Weekend BatchesSee Batch Details

      15. Under “Updates and different software” section, test “Normal set up”, and the 2 alternatives under “Other alternatives” and continue.

      16. In Installation type, test Erase disk and deployation Ubuntu.

      17. Choose your contemporary vicinity and installation your profile. Click Continue.

      18. It can also additionally take 10-15 mins to finish the set up.

      19. Once the set up finishes, restart the digital system.

      20. We are executed with pre-request, and might now continue with the use of this Ubuntu.

     Ubuntu on Oracle Virtual box
    Ubuntu on Oracle Virtual box

      Docker Installation Process on Ubuntu (Method 1)

      Install Docker on Ubuntu Using Default Repositories:-

    • One of the perfect approaches is the set up of Docker from the same old Ubuntu 20.04 repositories, however It’s feasible that the Ubuntu default repositories have now no longer up to date to the state-of-the-art revision of Docker. It occurs due to the fact in a few instances Docker isn’t assisting that unique Ubuntu version. Therefore, there may be a situation where Ubuntu default repositories have now no longer up to date to the state-of-the-art version.
    • Log in to Virtual Box. Run “docker” as command to test if it’s miles formerly installed.
    • To set up Docker on Ubuntu box, first replace the packages. It will ask for a password. Enter it and permit the machine to finish the updates.
    • To set up Docker from Ubuntu default repositories, use the under command: sudo apt set up docker.io
    • To test the hooked up model, use the under: docker –model
    • Since mentioned above, it has hooked up the 19.03.eight model of docker while the modern model is 20.04.

      Install Docker from Official Repository (Method 2)

      For putting in docker on ubuntu 20.04 with the brand new version, we’ll continue with permitting the Docker repository, uploading the repository GPG key, and sooner or later putting in the package:-

    • To set up the docker on Ubuntu box, replace your present listing of applications. It will ask for a password. Enter it and permit the device to finish the updates.
    • We want to put in some prerequisite applications to upload HTTPS repository.
    • Import the repository’s GPG key the use of the following curl command.
    • Add the Docker APT repository to the system.
    • Again, replace the bundle database with the Docker packages.
    • Finally, deployation Docker the use of underneath command.
    • To take a look at the established model use underneath.
    • To start, allow and take a look at the reputation of docker, use underneath command.
    • To test machine huge statistics concerning docker installation, we use the command “docker info”. Information this is proven consists of the kernel version, range of bins and particular images.

      Running Docker Images and Verifying the process

      To take a look at whether or not you may get entry to and down load the pix from Docker Hub, run the subsequent command:

      In case of mistakes acquired after strolling the docker run command, you may accurate it the use of the subsequent steps, in any other case continue with the subsequent step of checking the image.

      Uninstall Procedure

      Below are the not unusualplace instructions used to do away with photos and containers:-

      1. To absolutely uninstall Docker, use below:

      2. To perceive what are the set up packages, that is the command:

      3. To do away with photos, containers, volumes, or consumer created configuration files, those instructions may be used:

      4. sudo rm -rf /var/lib/docker /etc/docker

      5. sudo rm /etc/apparmor.d/docker

      6. sudo groupdel docker

      7. sudo rm -rf /var/run/docker.sock

    Docker Sample Resumes! Download & Edit, Get Noticed by Top Employers! Download

      Conclusion

      If you located this Install Docker on Ubuntu weblog applicable and useful, do take a look at out the Docker-Training workshop from KnowledgeHut, wherein you could get ready with all of the simple and superior ideas of Docker!

    Name Date Details

    14-Oct-2024

    (Mon-Fri) Weekdays Regular

    16-Oct-2024

    (Mon-Fri) Weekdays Regular

    12-Oct-2024

    (Sat,Sun) Weekend Regular

    12-Oct-2024

    (Sat,Sun) Weekend Fasttrack