Docker CLI Tutorial

Learn Docker from the CLI up — images, containers, volumes, networking, Compose, and shipping a real multi-container app to production.

ជំពូកនេះមិនទាន់ត្រូវបានបកប្រែជាភាសាខ្មែរនៅឡើយទេ — សូមអានជាភាសាអង់គ្លេសខាងក្រោម។

A complete, hands-on Docker course: starting from "what is a container" all the way to deploying a multi-container app to a production VPS. Every concept is paired with real docker CLI commands you can run yourself.

Source code and video

The full source code and example projects referenced throughout this series are available on GitHub: docker-cli-tutorial.

  1. 01What is Docker?Why Docker exists, images vs. containers, and installing and verifying Docker Desktop.
  2. 02Docker FundamentalsDocker's architecture, registries, persisting data with volumes, networks, and the basic build-run-manage workflow.
  3. 03Your First ContainerRun, name, and remove your first containers and images from the CLI.
  4. 04Essential Docker CommandsThe inspection, image-management, execution, and maintenance commands you'll use daily.
  5. 05Docker ImagesHow image layers and caching work, tagging conventions, and why to avoid the `latest` tag.
  6. 06DockerfileWrite your own Dockerfile and build and run a custom image from it.
  7. 07Building a Node.js AppContainerize a real Express API from scratch, from Dockerfile to a running container.
  8. 08Docker VolumesPersist container data with bind mounts and named volumes, and back it up and restore it.
  9. 09Docker NetworkingBridge, host, and none network drivers, custom networks, and DNS resolution between containers.
  10. 10Docker ComposeDefine and run multi-service applications with a single docker-compose.yml file.
  11. 11Multi-Container ProjectWire up a full NestJS + PostgreSQL + Redis + React stack with Docker Compose.
  12. 12Environment VariablesManage .env files, pass variables at runtime, handle secrets, and vary config across environments.
  13. 13Dockerizing DatabasesRun PostgreSQL, MySQL, MongoDB, and Redis in containers with persistent storage and data import/export.
  14. 14Docker Logs & DebuggingDebug running containers with logs, exec, inspect, stats, and top, plus a repeatable debugging workflow.
  15. 15Docker OptimizationShrink images with multi-stage builds, Alpine bases, layer caching, and security best practices.
  16. 16Docker RegistryLog in, tag, push, and pull images with Docker Hub, including private repositories.
  17. 17Deploy with DockerSet up an Ubuntu VPS, pull and run a production image, and put it behind an Nginx reverse proxy with HTTPS.
  18. 18Docker Compose in ProductionRestart policies, health checks, logging, and environment management for a production Compose stack.
  19. 19Docker Best PracticesFolder structure, naming conventions, security, non-root users, versioning, resource limits, and cleanup.
  20. 20Complete Real-World ProjectA full production architecture with an Nginx edge, SSL/TLS, layered Compose files, and a production-ready checklist.
  21. 21Bonus TopicsA tour of Docker Swarm, Kubernetes, Portainer, Traefik, CI/CD, monitoring, security scanning, and backup strategies.