Docker Hello World

Learn via video courses
Topics Covered

Welcome aboard the Docker journey! This beginner-friendly guide dives into the essentials, explaining key concepts and guiding you through installation on Linux, Windows, and macOS.

Docker empowers developers. It tackles common challenges and streamlines the software development cycle, making it an invaluable tool for your arsenal.

Ready to set sail? We'll start with a classic "Hello World" example to introduce you to the basics. Buckle up and let's get building!

Prerequisite

A basic level of understanding of OS and containerization is required to fully understand the concepts explained during 'docker hello world'.

Basic Terminologies

A lot of different objects work together to run an application inside Docker. An application requires objects such as - Docker Images for the application code, Docker Containers to run the application, and Docker Registries to save and download Docker Images.

Docker Container

It is the place where the docker runs an image. You can think of it in this way as well for simplicity: Images become containers when they run on Docker Engine.

Transform Your Career

Choose from our industry-leading programs designed for career success

NSDC Certified

Modern Software and AI Engineering Program

Master full-stack development with AI integration

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

Modern Data Science and ML with specialisation in AI

Advanced data science techniques with AI specialization

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

Advanced AIML with Specialisation in Agentic AI

Deep dive into AIML with focus on Agentic systems

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

DevOps, Cloud & AI Platform Engineering

Build and manage AI-powered cloud infrastructure

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

AI Engineering Advanced Certification by IIT-Roorkee

Premier AI engineering certification from IIT-Roorkee

3 MonthsDuration
AI-LedCurriculum
Career SupportSupport
Program highlights
Go to Program

Docker Image

It is a lightweight, executable package that consists of everything needed to run an application: code, libraries, third-party dependencies, environment variables, and configurations.

Dockerfile

It is a document that consists of all the commands a user wants to call on the command line to build an image.

Docker Installation in CentOS/Redhat

To be able to run the Docker Engine, you'll need to have a supported version of CentOS. The latest version is recommended.

In order to install the engine, we'll first set up the docker repository and then use the repository to install the docker engine.

Turn Learning into Career Growth

1200+Hiring Partners
89%Placement Rate
11,000+Placements
147%Avg Salary Increment
2.5XCareer Growth
₹23 LPAAvg Post-Scaler Salary
1200+Hiring Partners
89%Placement Rate
11,000+Placements
147%Avg Salary Increment
2.5XCareer Growth
₹23 LPAAvg Post-Scaler Salary

Repository Setup

Below commands would install the yum-utils package and set up the repository.

Installation of Engine

The below command would install the latest version of Docker Engine, containers, and Docker Compose.

Note If prompted to accept the GPG key, verify that the fingerprint matches 060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35, and if so, accept it.

Start and enable the docker services

Docker has been installed, but it hasn't been started yet. Let's start it.

Pull the hello-world image

Let's verify if the engine is able to pull an image by running the below command.

Execute Hello world

Let's verify if the engine is able to run a container by running the below command.

Conclusion

Great work! You have successfully understood the steps around installing docker and running containers on it. In the upcoming articles, we will dive deeper into the world of Docker.

Hiring Partners:
GoogleGoogleAmazonAmazonMicrosoftMicrosoftFlipkartFlipkartAdobeAdobe1200+ more