DevOps Peach

Docker & Kubernetes · Module 05

Docker in Real Projects – Operations and Docker Compose

Keep containers running while the daemon is down, watch metrics and logs, then run multi-container apps with Docker Compose, environment variables and their own network.

Practice interactively →

What you will learn

Lessons

  1. Live restore and running several processes in a container

    Live restore keeps containers running while the Docker daemon is down; each container should have one main service.

  2. Runtime metrics and logging

    docker stats reads metrics from cgroups; docker logs reads stdout/stderr through a logging driver, so turn on log rotation.

  3. Introduction to Docker Compose

    Declare every service of an app in one YAML file and manage its whole lifecycle with docker compose.

  4. Environment variables and networking in Compose

    .env substitutes variables in the Compose file, environment/env_file put variables into containers; services reach each other by name on the default network.