DOCKER SYLLABUS
Module 1: Introduction to Containers & Docker Fundamentals
1.1 What are Containers?
o Virtual Machines vs. Containers: The key differences.
o Benefits of Containerization (Portability, Isolation, Efficiency).
o Use cases for Docker.
1.2 Docker Architecture
o Understanding the Docker Daemon (Engine), Client, and Registry.
o Images vs. Containers.
o The role of Docker Hub.
1.3 Docker Installation & Setup
o Installing Docker Desktop (Windows/macOS).
o Installing Docker Engine on Linux (Ubuntu/CentOS).
o Verifying the installation (docker --version, docker info).
o Running your first container (docker run hello-world).
Module 2: Working with Docker Images
2.1 Managing Images
o Pulling images from Docker Hub (docker pull).
o Listing local images (docker images).
o Inspecting image layers (docker inspect).
o Removing images (docker rmi).
o Cleaning up dangling images (docker image prune).
2.2 Building Your Own Images with a Dockerfile
o Understanding the Dockerfile syntax.
o Common Dockerfile instructions: FROM, LABEL, RUN, CMD, ENTRYPOINT, COPY,
ADD, WORKDIR, EXPOSE, ENV.
o Building an image from a Dockerfile (docker build).
o Tagging images (-t).
2.3 Dockerfile Best Practices
o Minimizing image size.
o Leveraging the build cache.
o Using multi-stage builds.
o Using .dockerignore files.
o Security best practices (running as a non-root user).
Module 3: Working with Docker Containers
3.1 Container Lifecycle Management
o Creating and starting a container (docker create, docker start).
o Running a container in one command (docker run).
o Running in detached mode (-d).
o Listing running and stopped containers (docker ps).
o Stopping and killing containers (docker stop, docker kill).
o Restarting containers (docker restart).
o Removing containers (docker rm).
3.2 Interacting with Containers
o Viewing container logs (docker logs).
o Executing commands inside a running container (docker exec).
o Attaching to a container's TTY (docker attach).
o Inspecting a container's details (docker inspect).
3.3 Container Resource Management
o Monitoring container resource usage (docker stats).
o Limiting CPU and memory for containers.
Module 4: Data Management in Docker
4.1 Understanding Data Persistence
o Ephemeral nature of container data.
o Three types of mounts: volumes, bind mounts, and tmpfs mounts.
4.2 Docker Volumes (Recommended)
o Creating and managing named volumes (docker volume create, ls, inspect).
o Mounting a volume to a container (-v volume_name:container_path).
o Benefits of using volumes.
4.3 Bind Mounts
o Mounting a host directory into a container (-v host_path:container_path).
o Use cases for bind mounts (e.g., development, configuration files).
Module 5: Docker Networking
5.1 Container Networking Concepts
o Bridge, Host, and None network drivers.
o Network isolation and container communication.
5.2 Exposing Ports
o Mapping ports from the host to the container (-p).
o Understanding the EXPOSE instruction in a Dockerfile.
5.3 User-Defined Bridge Networks
o Creating a custom network (docker network create).
o Connecting containers to a network.
o Enabling communication between containers by name (service discovery).
o Use cases for multi-container applications.
Module 6: Docker Compose (Multi-Container Applications)
6.1 Introduction to Docker Compose
o Why use Docker Compose?
o Understanding the docker-compose.yml file format.
6.2 Building a Multi-Container Application
o Defining services, networks, and volumes in the YAML file.
o Using depends_on for service dependencies.
6.3 Docker Compose Commands
o Starting and stopping services (docker compose up, down).
o Building services (docker compose build).
o Viewing logs and status (docker compose logs, ps).
o Executing commands in services (docker compose exec).
o Managing environments with Compose.
Module 7: Advanced Topics & Orchestration Intro
7.1 Docker Hub & Registries
o Pushing your images to a registry (docker push).
o Image security scanning.
7.2 Docker Swarm (Introduction)
o Basic concepts of container orchestration.
o Initializing a Swarm cluster.
o Deploying services to a Swarm.
7.3 Introduction to Kubernetes
o Why Kubernetes?
o Kubernetes vs. Docker Swarm.
o Brief overview of key Kubernetes components (Pods, Deployments, Services).
7.4 Docker Security
o Securing the Docker daemon.
o Scanning for vulnerabilities (docker scan).
o Principle of least privilege.
Hands-On Labs / Practical Exercises
Lab 1: Run and interact with a simple container.
Lab 2: Build a custom image for a simple web application (e.g., Node.js, Python Flask
app).
Lab 3: Persist data from a database container using a Docker Volume.
Lab 4: Create a multi-container application with a web app and a database using Docker
Compose.
Lab 5: Publish your custom image to Docker Hub.
Lab 6: nop-commerce project