Hello dev.to community! 👋
Yesterday, I explored Linux Services & Systemd — the backbone of process management. Today, I’m diving into Docker — the magic behind modern containerization. 🐳
🔹 Why Docker matters for DevOps
Consistent environments: “Works on my machine” → no more!
Lightweight containers replace heavy VMs.
Standard for running apps in CI/CD pipelines.
Foundation for Kubernetes & cloud-native systems.
🧠 Core concepts I’m learning
⚙️ What is Docker?
A containerization platform that packages apps + dependencies.
Containers share the host OS kernel but remain isolated.
📦 Docker Images & Containers
Image = blueprint (e.g., nginx:latest).
Container = running instance of an image.
🔧 Basic Docker commands
Run a container:
docker run -it ubuntu bash
List containers:
docker ps -a
Stop & remove container:
docker stop
docker rm
Pull an image:
docker pull nginx
Build an image:
docker build -t myapp .
🗂️ Volumes & Port Mapping
Volumes persist data → docker run -v /data:/var/lib/mysql mysql
Ports expose services → docker run -p 8080:80 nginx
🛠️ Mini use cases for DevOps
Run Jenkins, Nginx, or Redis in containers.
Test apps in isolated environments.
Package CI/CD pipelines into reusable images.
⚡ Pro tip
If a container fails:
Check logs → docker logs
Inspect configuration → docker inspect
Exec into container → docker exec -it bash
🧪 Hands-on mini-lab (try this!)
Run an Nginx container:
docker run -d -p 8080:80 nginx
Verify:
Open → http://localhost:8080
🎯 You should see the Nginx welcome page in a container! 🚀
🎯 Key takeaway
Docker is the backbone of DevOps — making apps portable, lightweight, and production-ready. Mastering Docker is the first step toward Kubernetes.
🔜 Tomorrow (Day 8)
I’ll explore Docker Networking & Volumes — connecting containers and persisting data.
🔖 #Docker #Containers #DevOps #CICD #DevOpsJourney #SRE #CloudNative #Automation #OpenSource
SOCIAL SHARE CARD GENERATOR