Docker: Complete Course
Master Docker from first principles to production-grade multi-container deployments using real-world workflows. You will build and ship a fully containerized full-stack application with Docker Compose, custom networks, and CI-ready images.
Course Content
6 modules · 30 lessonsDocker Fundamentals
Understand what Docker is, why it exists, and run your first container from the command line.
What is Docker and why do developers use it
containerization concept, VMs vs containers, Docker daemon, Docker Engine, host OS sharing, developer use cases
How to install Docker on Linux, Mac, and Windows
Docker Desktop, Docker Engine on Linux, apt install, brew install, WSL2 backend, post-install steps, docker group
Docker images vs containers explained
image definition, container definition, image layers, read-only vs read-write layer, image tags, container lifecycle
Essential Docker CLI commands every developer must know
docker run flags, docker stop, docker rm, docker exec, docker logs, docker inspect, port mapping, detached mode
How Docker volumes work and when to use them
named volumes, bind mounts, tmpfs mounts, data persistence, volume inspect, -v flag, volume vs bind mount
Building Docker Images with Dockerfile
Write production-quality Dockerfiles that build small, fast, and secure images for any application stack.
Dockerfile syntax and instructions explained
FROM, RUN, COPY, ADD, CMD, ENTRYPOINT, WORKDIR, EXPOSE, ENV, ARG
How Docker layer caching works and how to exploit it
layer cache invalidation, cache-busting, dependency layer trick, cache ordering, build performance, --no-cache flag
Multi-stage Docker builds for smaller production images
multi-stage build, builder stage, final stage, COPY --from, image size reduction, Go binary, compiled artifacts
How to use .dockerignore to speed up builds
.dockerignore file, build context, context size, node_modules exclusion, .git exclusion, pattern syntax
Pushing Docker images to Docker Hub and private registries
docker login, docker tag, docker push, Docker Hub repository, ECR, GHCR, image naming convention, registry authentication
Docker Networking
Configure Docker networks so containers can communicate securely with each other and the outside world.
How Docker networking works by default
bridge network, docker0 interface, container IP assignment, default bridge, host network, none network, network isolation
How to create custom Docker networks for container communication
custom bridge network, docker network create, container name DNS, network connect, network disconnect, inter-container communication
Port mapping and exposing containers to the host
docker run -p, host port, container port, EXPOSE instruction, 0.0.0.0 binding, localhost binding, multiple port mappings
Docker DNS and service discovery between containers
embedded DNS server, container name resolution, network alias, --network-alias, DNS round-robin, service discovery pattern
Docker network troubleshooting and debugging techniques
docker network inspect, docker exec ping, nslookup inside container, netstat inside container, connectivity testing, common network errors
Docker Compose
Define, run, and manage multi-container applications declaratively using Docker Compose.
What is Docker Compose and when to use it
docker-compose.yml, services, Compose CLI, single-host orchestration, Compose vs Kubernetes, compose up, compose down
Writing your first docker-compose.yml file
services block, image vs build, ports, environment, volumes, depends_on, restart policy, networks block
Docker Compose environment variables and .env files
.env file, variable substitution, environment block, env_file, docker compose config, secrets management, .env.example
Docker Compose health checks and service dependencies
healthcheck instruction, depends_on condition, service_healthy, service_started, service_completed_successfully, startup ordering
Scaling services and overriding Compose files for different environments
docker compose scale, --scale flag, compose override files, docker-compose.override.yml, -f flag, production override pattern
Docker in Production
Harden, optimize, and deploy Docker containers using production best practices for security, logging, and resource management.
Docker container security best practices
non-root user, USER instruction, read-only filesystem, --read-only flag, capability dropping, seccomp, no-new-privileges, image scanning
Docker logging drivers and centralized log management
json-file driver, logging driver, --log-driver, fluentd, gelf, awslogs, docker logs, log rotation, log-opts
Docker resource limits and preventing container sprawl
--memory, --cpus, --memory-swap, cgroup limits, docker stats, resource starvation, OOM killer, resource reservation in Compose
How to use Docker secrets for sensitive configuration
Docker secrets, tmpfs, /run/secrets, Compose secrets, file-based secrets, environment variable risk, secret rotation
Container restart policies and production uptime strategies
restart policy, always, unless-stopped, on-failure, no policy, exit codes, health-based restart, Compose restart, production availability
CI/CD with Docker and Container Registries
Automate building, testing, and pushing Docker images in CI pipelines and manage images in production-grade registries.
Building Docker images in GitHub Actions CI pipelines
GitHub Actions workflow, docker/build-push-action, GITHUB_TOKEN, ghcr.io, build caching in CI, on:push trigger, workflow_dispatch
Docker build cache in CI pipelines for faster builds
GitHub Actions cache, cache-from, cache-to, type=gha, BuildKit cache, cache-backend, registry cache, build time reduction
Docker image tagging strategies for CI and production
git sha tags, semantic versioning tags, latest tag, docker/metadata-action, multi-tag strategy, immutable tags, tag promotion
Running Docker containers in CI for integration testing
services in GitHub Actions, docker-compose in CI, integration tests, test containers, docker compose up in CI, service health checks, test teardown
How to scan Docker images for vulnerabilities in CI
Trivy, docker scout, CVE scanning, SARIF format, GitHub Security tab, fail-on-severity, CI security gate, base image updates
