# Docker

Package an app once and run it the same way on your laptop, in CI and in production.

Level: Beginner. Free on DevOps Academy: https://devops.rajeev.pro/courses/docker

## Roadmap

1. **Introduction**: Why containers took over, and how they differ from VMs. [Lesson](https://devops.rajeev.pro/courses/docker/01-why-containers)
   Topics: What containers are; Why we need them; Bare metal vs VMs vs containers; Docker & OCI
2. **Under the hood**: Containers are Linux features. Knowing them makes debugging much easier. [Lesson](https://devops.rajeev.pro/courses/docker/02-under-the-hood)
   Topics: Namespaces; cgroups; Union filesystems
3. **Installation**: Get a working Docker setup on your machine and on a server. [Lesson](https://devops.rajeev.pro/courses/docker/03-installation)
   Topics: Docker Desktop; Docker Engine on Linux; Rootless mode
4. **Docker basics**: Run, inspect and stop your first containers. [Lesson](https://devops.rajeev.pro/courses/docker/04-docker-basics)
   Topics: Images vs containers; docker run; Ports; logs & exec
5. **Third-party images**: Run databases and tools in seconds without installing them. [Lesson](https://devops.rajeev.pro/courses/docker/05-third-party-images)
   Topics: Databases; CLI tools; Language runtimes
6. **Data persistence**: Containers forget everything when they stop. Learn where data should live. [Lesson](https://devops.rajeev.pro/courses/docker/06-data-persistence)
   Topics: Ephemeral filesystem; Volumes; Bind mounts
7. **Building images**: Write Dockerfiles that build fast and ship small. [Lesson](https://devops.rajeev.pro/courses/docker/07-building-images)
   Topics: Dockerfile; Layer caching; Multi-stage builds; Smaller, safer images
8. **Registries**: Store and share images so CI and servers can pull them. [Lesson](https://devops.rajeev.pro/courses/docker/08-registries)
   Topics: Docker Hub; GHCR & ECR; Tagging best practices
9. **Running containers**: Run multi-container apps with one file. [Lesson](https://devops.rajeev.pro/courses/docker/09-running-containers)
   Topics: docker run options; Runtime config; Docker Compose
10. **Networking**: How containers find each other and the outside world. [Lesson](https://devops.rajeev.pro/courses/docker/10-networking)
   Topics: Bridge networks; Published ports; Container DNS
11. **Security**: Most container images in the wild run as root with known CVEs. Yours won't. [Lesson](https://devops.rajeev.pro/courses/docker/11-security)
   Topics: Image scanning; Non-root users; Runtime security; Secrets
12. **Docker CLI**: Keep a busy Docker host tidy and understandable. [Lesson](https://devops.rajeev.pro/courses/docker/12-docker-cli)
   Topics: Images; Containers; Volumes; Networks; Cleanup (prune)
13. **Developer experience**: Use containers for daily development, not just deployment. [Lesson](https://devops.rajeev.pro/courses/docker/13-developer-experience)
   Topics: Hot reloading; Debugging; Tests in containers; Docker in CI
14. **Deploying containers**: Where containers go next. This leads into the Kubernetes course. [Lesson](https://devops.rajeev.pro/courses/docker/14-deploying-containers)
   Topics: PaaS options; Docker Swarm; Kubernetes
15. **Back to your pipeline**: Add the image you can now build properly to the CI/CD pipeline: test, scan, push and deploy it. [Lesson](https://devops.rajeev.pro/courses/docker/15-back-to-your-pipeline)
   Topics: Tests in the image; Scan before push; Build once, deploy the digest; Deploy and roll back
