DEV Community

Kamrul Hasan
Kamrul Hasan

Posted on

1 1 1 1

Check Docker Installation Details- Part 2

Image description

Running a Test Container

Now that we've confirmed Docker is installed and running (Part 1), let's test the setup by running a simple container. This will verify that Docker can successfully download images and run containers.

The Hello World Container

Docker offers a lightweight "hello-world" image specifically designed to test Docker installations. This minimal container confirms that:

• The Docker client can connect to the Docker daemon.
• The Docker daemon has access to pull images from Docker Hub.
• Docker can create and launch or run containers.

1.Let's run this test container with the following command:

docker run hello-world
Enter fullscreen mode Exit fullscreen mode

Image description
When you run this command for the first time, Docker will:

• Check if the hello-world image exists locally
• If not, download it from Docker Hub
• Create a container from this image
• Start the container, which prints a message and exits

This message confirms that your Docker installation is working correctly.

Listing Containers

After running the hello-world container, let's check the list of containers on your system. The container we just ran has already exited, but we can still see it in the list of all containers.

2.To see all containers (including stopped ones), run:

docker ps -a
Enter fullscreen mode Exit fullscreen mode

Image description

The -a flag shows all containers, including those that have stopped. Without this flag, docker ps would only show running containers.
Note the STATUS column shows "Exited (0)", which means the container completed its task and exited with a status code of 0 (indicating success).

Listing Docker Images

  1. The hello-world image was downloaded to your local machine. Let's verify this by listing all Docker images:
docker images
Enter fullscreen mode Exit fullscreen mode

Image description

This confirms that the hello-world image is stored locally on your system.

LinkedIn: https://linkedin.com/in/kamrul-dev
GitHub: https://github.com/kamrul-dev

Related Keywords:
How to verify Docker installation on your system,
Checking Docker version and system info via CLI,
Confirming Docker is properly installed on Linux/Mac/Windows,
Commands to check Docker installation status,
Troubleshooting Docker setup issues,

Kamrul Hasan DevOps Engineer,
DevOps tips by Kamrul Hasan,
Kamrul Hasan Docker tutorials,
Learn DevOps with Kamrul Hasan,
Kamrul Hasan automation expert,
Kamrul Hasan cloud and containers,
CI/CD pipelines by Kamrul Hasan,
Kamrul Hasan Kubernetes & Docker,

Dynatrace image

Observability should elevate – not hinder – the developer experience.

Is your troubleshooting toolset diminishing code output? With Dynatrace, developers stay in flow while debugging – reducing downtime and getting back to building faster.

Explore Observability for Developers

Top comments (0)

ITRS image

See What Users Experience in The Browser — Anywhere, Anytime

Simulate logins, checkouts, and payments on SaaS, APIs, and internal apps. Catch issues early, baseline web performance, and stay ahead of incidents. Easily record user journeys right from your browser.

Start Free Trial

👋 Kindness is contagious

Explore this insightful piece, celebrated by the caring DEV Community. Programmers from all walks of life are invited to contribute and expand our shared wisdom.

A simple "thank you" can make someone’s day—leave your kudos in the comments below!

On DEV, spreading knowledge paves the way and fortifies our camaraderie. Found this helpful? A brief note of appreciation to the author truly matters.

Let’s Go!