Close Menu
Luminari | Learn Docker, Kubernetes, AI, Tech & Interview PrepLuminari | Learn Docker, Kubernetes, AI, Tech & Interview Prep
  • Home
  • Technology
    • Docker
    • Kubernetes
    • AI
    • Cybersecurity
    • Blockchain
    • Linux
    • Python
    • Tech Update
    • Interview Preparation
    • Internet
  • Entertainment
    • Movies
    • TV Shows
    • Anime
    • Cricket
What's Hot

Will Musk vs. Trump affect xAI’s $5 billion debt deal?

June 7, 2025

Lilo & Stitch Dancing Circles Around Ballerina Opening

June 7, 2025

Initial D, MF Ghost Manga Get Subaru and Subaru Sequel in July – News

June 7, 2025
Facebook X (Twitter) Instagram
Facebook X (Twitter) Instagram
Luminari | Learn Docker, Kubernetes, AI, Tech & Interview Prep
  • Home
  • Technology
    • Docker
    • Kubernetes
    • AI
    • Cybersecurity
    • Blockchain
    • Linux
    • Python
    • Tech Update
    • Interview Preparation
    • Internet
  • Entertainment
    • Movies
    • TV Shows
    • Anime
    • Cricket
Luminari | Learn Docker, Kubernetes, AI, Tech & Interview PrepLuminari | Learn Docker, Kubernetes, AI, Tech & Interview Prep
Home » Learn Docker for free : Runing first container
Misc

Learn Docker for free : Runing first container

HarishBy HarishJuly 3, 2024No Comments3 Mins Read
Facebook Twitter Pinterest LinkedIn Reddit WhatsApp Email
Share
Facebook Twitter Pinterest Reddit WhatsApp Email

Table of contents
  • Prerequisites

  • Step 1: Start the Docker Daemon

  • Step 2: Pull the “Hello World” Image

  • Step 3: Run Your First Container

  • Step 4: Verify Your Container is Running

  • Step 5: Inspect Your Container

  • Step 6: Stop Your Container

  • Step 7: Remove Your Container

Docker is a powerful tool for deploying and managing applications in containers. Containers are lightweight and portable, making them an ideal choice for developing, testing, and deploying applications. In this blog post, we’ll walk you through the process of running your first Docker container.

Prerequisites

Before we begin, make sure you have:

  1. Docker installed: You can download and install Docker from the official website: https://www.docker.com/get-started/ ,and also checkout our blog Installing docker

  2. A basic understanding of Linux: Although not necessary, having a basic understanding of Linux commands will help you navigate the process. also checkout our blog for commonly used Linux commands

Step 1: Start the Docker Daemon

To start using Docker, you need to launch the Docker daemon (dockerd). The daemon is responsible for creating and managing containers on your machine.

  1. Open a terminal or command prompt.

  2. Run the following command to start the Docker daemon:

“sudo systemctl start docker”

Replace systemctl with service if you’re using an older Linux distribution.

Step 2: Pull the “Hello World” Image

The “hello-world” image is a simple container that prints “Hello, World!” when run. This image is a great starting point for your first Docker container.

  1. Run the following command to pull the “hello-world” image:

“docker pull hello-world”

This command will download the “hello-world” image from Docker Hub (the official repository of Docker images).

Step 3: Run Your First Container

Now that you have the “hello-world” image, it’s time to run your first container!

  1. Run the following command to start a new container:

“docker run hello-world”

This command will create a new container from the “hello-world” image and run it.

Step 4: Verify Your Container is Running

To verify that your container is running, you can use the docker ps command:

“docker ps”

This command will list all containers currently running on your machine. You should see the “hello-world” container listed in the output.

Step 5: Inspect Your Container

Now that your container is running, let’s inspect it!

  1. Run the following command to get information about your container:

docker inspect hello-world

This command will provide details about your container, such as its IP address, port mappings, and environment variables.

Step 6: Stop Your Container

When you’re finished exploring your container, let’s stop it!

  1. Run the following command to stop your container:

docker stop hello-world

This command will send a signal to your container to shut down.

Step 7: Remove Your Container

Finally, let’s remove your container:

  1. Run the following command to delete your container:

docker rm hello-world

This command will remove your “hello-world” container from your machine.

That’s it! You’ve successfully run your first Docker container. In this guide, you learned how to:

  1. Start the Docker daemon.

  2. Pull an image (the “hello-world” image).

  3. Run a new container from the pulled image.

  4. Verify that your container is running.

  5. Inspect your container’s details.

  6. Stop your container.

  7. Remove your container.

I know its a very simple, standard example. But KISS(Keep it simple stupid). You made a progress in next blog i will explain about docker commands

Top^

Suggested by Srinivas B K

<< Understanding Docker Images and Containers

Docker commands >>

Share. Facebook Twitter Pinterest LinkedIn WhatsApp Reddit Email
Previous ArticleLearn Docker for free: Installation
Next Article Linux Interview questions and preparation – part 2 (Linux commands)
Harish
  • Website
  • X (Twitter)

Related Posts

We’ve entered an era of fintech maximalism according to Mark Goldberg

April 16, 2025

Apple says zero-day bugs exploited against ‘specific targeted individuals’ using iOS

April 16, 2025

India’s Uber-rival BluSmart appears to suspend service in wake of EV loan probe

April 16, 2025

Bluesky feed builder Graze raises $1M, rolls out ads

April 16, 2025

Kia is pitching Americans an affordable EV sedan with EV4 debut

April 16, 2025

NSO lawyer names Mexico, Saudi Arabia, and Uzbekistan as spyware customers accused of 2019 WhatsApp hacks

April 16, 2025
Add A Comment
Leave A Reply Cancel Reply

Our Picks

Will Musk vs. Trump affect xAI’s $5 billion debt deal?

June 7, 2025

Lilo & Stitch Dancing Circles Around Ballerina Opening

June 7, 2025

Initial D, MF Ghost Manga Get Subaru and Subaru Sequel in July – News

June 7, 2025

Recap of ‘Diddy’ trial: ‘Jane’ says Sean Combs threatened to cut her off financially over sexual ‘hotel nights’

June 7, 2025
Don't Miss
Blockchain

Bitcoin market of 2025 driven by stablecoin regulation: Finance Redefined

June 6, 20256 Mins Read

Despite a week of price consolidation for Bitcoin (BTC), emerging digital asset legislation may provide…

How to Earn Passive Income with Peer-to-Peer Lending

June 6, 2025

Mass data deletion by governments is accelerating.

June 6, 2025

Cointelegraph Bitcoin & Ethereum Blockchain News

June 6, 2025

Subscribe to Updates

Subscribe to our newsletter and never miss our latest news

Subscribe my Newsletter for New Posts & tips Let's stay updated!

About Us
About Us

Welcome to Luminari, your go-to hub for mastering modern tech and staying ahead in the digital world.

At Luminari, we’re passionate about breaking down complex technologies and delivering insights that matter. Whether you’re a developer, tech enthusiast, job seeker, or lifelong learner, our mission is to equip you with the tools and knowledge you need to thrive in today’s fast-moving tech landscape.

Our Picks

Will Musk vs. Trump affect xAI’s $5 billion debt deal?

June 7, 2025

Building More Scalable GenAI Applications for Startups and Developers

June 7, 2025

2025 will be a ‘pivotal year’ for Meta’s augmented and virtual reality, says CTO

June 6, 2025

Subscribe to Updates

Subscribe to our newsletter and never miss our latest news

Subscribe my Newsletter for New Posts & tips Let's stay updated!

Facebook X (Twitter) Instagram Pinterest
  • Home
  • About Us
  • Advertise With Us
  • Contact Us
  • DMCA Policy
  • Privacy Policy
  • Terms & Conditions
© 2025 luminari. Designed by luminari.

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