// docker.eknathalabs.com  —  Built by Engineer

Master
Container
Engineering 🐳

From your first docker run to production-grade multi-stage builds. AI-powered tools, interactive labs, a 100-question quiz, and a complete cheatsheet.

▶ Start Learning ⚙ AI Tools ⌘ Cheatsheet
docker ~ container lifecycle
eknatha@dockerlab $ docker build -t myapp:v2.1 --no-cache .
✓ Step 1/8: FROM node:20-alpine ✓ Step 2/8: WORKDIR /app ✓ Step 3/8: COPY package*.json ./ ✓ Step 4/8: RUN npm ci --only=production ⚠ Step 5/8: COPY . . — Consider .dockerignore (node_modules: 142MB) ✓ Successfully built b3a9f7c1d2e4 ✓ Tagged: myapp:v2.1 (Final size: 287MB → 94MB optimized)
eknatha@dockerlab $ docker run --rm -p 3000:3000 myapp:v2.1
✓ Container started · http://localhost:3000
eknatha@dockerlab $
10
Modules
8
AI Tools
150+
Commands
100
Quiz Q&A
Free
Always

Everything from basics
to production-grade

📦
Container Fundamentals
Namespaces, cgroups, union filesystems. How Docker really works under the hood.
Live
🏗️
Dockerfile Mastery
Layer caching, multi-stage builds, BuildKit, ARG vs ENV, COPY vs ADD.
Live
🌐
Networking Deep Dive
Bridge, host, overlay, macvlan networks. Port mapping, DNS, container-to-container comms.
Live
💾
Volumes & Storage
Bind mounts vs volumes vs tmpfs. Persistent data, backup strategies, permissions.
Live
🎼
Docker Compose
Multi-service apps, depends_on, health checks, profiles, secrets, override files.
Live
🔒
Container Security
Non-root users, read-only filesystems, seccomp, AppArmor, image scanning with Trivy.
Coming soon
📊
Image Optimization
Slim base images, .dockerignore, layer squashing, Dive analysis, size benchmarks.
Coming soon
🚀
CI/CD with Docker
GitHub Actions pipelines, GHCR, ECR push, build caching in CI, multi-platform builds.
Coming soon
⚙️
Production Patterns
Resource limits, restart policies, logging drivers, health checks, graceful shutdown.
Coming soon

8 tools built for
container engineers

🔍
Dockerfile Linter
Paste any Dockerfile → get security, performance & best-practice issues instantly
📖
Dockerfile Explainer
AI breaks down every instruction line-by-line with context and alternatives
🎼
Compose Explainer
Paste compose.yaml → understand services, dependencies and networking visually
📉
Image Size Analyzer
Layer-by-layer breakdown with optimization suggestions to shrink your image
🛠️
Dockerfile Generator
Describe your app → get a production-ready, optimized Dockerfile instantly
🐛
Error Troubleshooter
Paste docker error output → AI diagnoses root cause & gives fix steps
🌐
Network Visualizer
Input compose or run commands → see network topology and connectivity map
🔒
Security Auditor
Scan Dockerfile for security misconfigs: root user, exposed ports, vulnerable bases

Dockerfile Linter

📄 Dockerfile · AI-powered analysis
ERROR Line 1: Using ubuntu:latest is unpredictable. Pin to a specific digest or use ubuntu:22.04
WARN Line 1: ubuntu is 77MB. Consider node:20-alpine (7MB) for Node.js apps
WARN Line 3: COPY . . before npm install busts cache on every code change. Copy package*.json first
ERROR Line 6: No user specified — container runs as root. Add USER node before CMD
INFO Missing: No .dockerignore detected. Add one to exclude node_modules, .git

100 Docker Q&A

Question 1 of 100 ⚡ 0 XP
What is the difference between CMD and ENTRYPOINT in a Dockerfile?
A CMD sets the base image; ENTRYPOINT sets the command to run
B They are identical — ENTRYPOINT is just the older syntax
C ENTRYPOINT sets the executable; CMD provides default arguments that can be overridden at runtime
D CMD runs during build; ENTRYPOINT runs when the container starts
✅ Correct! ENTRYPOINT defines the main process (e.g., ["node"]) and CMD provides default arguments (e.g., ["app.js"]). Running docker run myimage server.js overrides CMD but not ENTRYPOINT. This pattern is commonly used in official images.

150+ commands,
click to copy

Container lifecycle
docker run -d --name app nginx copied!
docker stop app && docker rm app copied!
docker exec -it app sh copied!
docker logs -f --tail 100 app copied!
docker inspect app copied!
Images
docker build -t myapp:latest . copied!
docker build --no-cache --progress=plain . copied!
docker image ls --format table copied!
docker rmi $(docker images -f dangling=true -q) copied!
docker save myapp | gzip > myapp.tar.gz copied!
Networking
docker network create --driver bridge mynet copied!
docker network connect mynet app copied!
docker network inspect mynet copied!
docker run --network host nginx copied!
docker run -p 8080:80 nginx copied!
Cleanup
docker system prune -af --volumes copied!
docker container prune copied!
docker volume prune copied!
docker ps -aq | xargs docker rm -f copied!
docker builder prune copied!

Zero to container
expert, structured

01
Container basics & first run
Understand what containers are, install Docker, run your first container, explore the filesystem.
docker run docker ps docker exec
02
Writing your first Dockerfile
Build a custom image, understand layers, cache busting, and choosing the right base image.
FROM RUN COPY CMD
03
Multi-service apps with Compose
Run a full stack (app + db + cache) with Docker Compose. Services, volumes, networks.
compose.yaml depends_on healthcheck
04
Production-ready images
Multi-stage builds, non-root user, .dockerignore, image scanning, size optimization.
multi-stage trivy dive
05
Ship to production & Kubernetes
Push to registries, CI/CD pipelines, container resource limits, and the bridge to Kubernetes.
ECR GHCR GitHub Actions