Getting Started with Docker: A Beginner-Friendly Guide
Docker has become a must-have tool for developers, allowing us to run applications consistently across different environments. If you’re new to Docker, don’t worry — this guide will help you getting started with Docker.
What is Docker?

Docker is a platform that lets you package your applications and all their dependencies into containers. These containers run consistently on any system — whether it’s your local laptop, a staging server, or the cloud.
Think of a container like a lightweight, isolated virtual machine, but much faster and more efficient.
Why Use Docker?
✅ Run your app anywhere
✅ Simplify setup and deployment
✅ Avoid “it works on my machine” problems
✅ Save time with reusable images
Installing Docker
To get started, install Docker Desktop:
- Windows/macOS: https://www.docker.com/products/docker-desktop
- Linux: Install using your distro’s package manager (e.g.
apt
,dnf
,pacman
)
Once installed, verify it works:
docker --version

Your First Docker Container
Let’s run a simple web server using Docker.
docker run -d -p 8080:80 nginx

✅ This command:
- Downloads the nginx image (if not already available)
- Starts a container in the background (
-d
) - Maps port 80 inside the container to port 8080 on your machine
Now open your browser and visit http://localhost:8080
. You’ll see the NGINX welcome page — served by a container!

Understanding the Command
docker run # Run a new container
-d # Detached mode (run in background)
-p 8080:80 # Map host port 8080 to container port 80
nginx
Listing Running Containers
docker ps
This shows all active containers. You’ll see the nginx container along with its ID and port mapping.
Stopping and Removing Containers
docker stop <container_id>
docker rm <container_id>
Replace <container_id>
with the ID from docker ps
. This stops and removes the container.
Congratulations! You’ve just launched your first Docker container. You now understand what Docker is and how to run an app in seconds. In future posts, we’ll dive into building custom images with Dockerfiles and managing complex apps with Docker Compose.
This is the end of the Getting Started with Docker: A Beginner-Friendly Guide.
You can read more useful articles like How To Configure Varnish Cache In Magento 2.
Follow us for the more helpful posts!
We hope this is a useful post for you.
Thank you for reading!