AWS Global Infrastructure

DevOps

Topics Covered
  • DevOps (92 Blogs)
  • Docker (9 Blogs)
  • DevOps Engineer Masters Program (18 Blogs)
  • Kubernetes (11 Blogs)
SEE MORE

Install Docker – Docker Installation On Ubuntu And CentOS

Last updated on Mar 14,2023 24.6K Views

Aayushi Johari
A technophile with a passion for unraveling the intricate tapestry of the... A technophile with a passion for unraveling the intricate tapestry of the tech world. I've spent over a decade exploring the fascinating world of...
2 / 11 Blog from Docker

In this blog, I will guide you through the process to install Docker in simple steps. In case you are not acquainted with Docker, don’t forget to check out this blog. Installing docker is just a piece of cake, you just need to run few commands and you’re done! 

In this Install docker blog, you will learn:

So, let’s get started by first installing Docker on Ubuntu operating system.

Docker installation On Ubuntu

Step 1: To install docker on Ubuntu box, first let us update the packages.


sudo apt-get update

This will ask for the password. Refer to the below screenshot to get a better understanding.

UpdatePackages - Install Docker - Edureka

Step 2: Now before installing docker, I need to install the recommended packages. For that, just type in the below command:

sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual

Press “y” to continue. 

Packages - Install Docker - Edureka.png

After this, we are done with the pre-requisites! Now, let’s move ahead and install Docker.

Step 3: Type in the below command to install docker engine:

sudo apt-get install docker-engine

Sometimes it will ask again ask for the password. Hit enter and the installation will begin.

DockerEngine - Install Docker - Edureka.png

One this is done, your task to install docker will be completed!

Step 4: So let’s just simply start the docker service. For that, just type in the below command:


sudo service docker start

DocketService - Install Docker - Edureka

It says your job is already running. Congratulations! docker has been successfully installed.

Step 5: Now just to verify that docker is successfully running, let me show you how to pull a CentOS image from docker hub and run the CentOS container. For that, just type in the below command:

sudo docker pull centos

First, it will check the local registry for CentOS image. If it doesn’t find there, then it will go to the docker hub and pull the image. Refer to the below screenshot for better understanding:

PullImage - Install Docker - Edureka
So we have successfully pulled a centOS image from docker hub. Next, let us run the CentOS container. For that, just type in the below command:


sudo docker run -it centos

Container - Install Docker - Edureka

As you can see in the above screenshot, we are now in the CentOS container!

So to summarize, We have first installed docker on Ubuntu, after that we have pulled a CentOS image from docker hub and using that image, we have successfully built a CentOS container. To know more about docker containers and how it works, you can refer this blog on Docker Container.

This is how you install docker and build a container on Ubuntu. 

Install Docker On CentOS

To install docker on your CentOS machine, I would suggest you to go through this docker installation video. This Edureka Docker Installation Tutorial will help you to learn how to install Docker on a CentOS operating system and how to run a Docker container using Docker Run command. Go ahead, enjoy the video and tell me what you think.

Docker Installation | Docker Installation In CentOS 

If you found this “Install Docker” blog, relevant, check out the DevOps Training by Edureka, a trusted online learning company with a network of more than 250,000 satisfied learners spread across the globe. You can get a better understanding with this Online Docker Certification Course. The Edureka DevOps Certification Training course helps learners gain expertise in various DevOps processes and tools such as Puppet, Jenkins, Nagios and GIT for automating multiple steps in SDLC.
Got a question for us? Please mention it in the comments section of this “Install Docker” blog and we will get back to you as soon as possible.

 

Upcoming Batches For Docker Certification Training Course
Course NameDateDetails
Docker Certification Training Course

Class Starts on 7th December,2024

7th December

SAT&SUN (Weekend Batch)
View Details
Comments
0 Comments

Join the discussion

Browse Categories

webinar REGISTER FOR FREE WEBINAR
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP

Subscribe to our Newsletter, and get personalized recommendations.

image not found!
image not found!

Install Docker – Docker Installation On Ubuntu And CentOS

edureka.co