Introduction to Docker and Docker Compose

This course provides an introduction to containerization using Docker and Docker Compose. You will learn how to create Docker images, how to run Docker containers, and how to use Docker volumes and networks effectively. You will also learn how to use Docker Compose to automate these tasks via reusable configuration files.

Duration

2 days

 

Prerequisites

  • This course is aimed at developers or DevOps engineers that need to learn how to use Docker to create and manage containerized applications

What you'll learn

  • Understand Docker images and containers
  • Create volumes in Docker
  • Manage Docker networks
  • Use Docker Compose to build images and run containers
  • Use Docker Compose to manage configuration, volumes, and networks
  • Docker best practices

Course details

Introduction to Docker

  • Introduction to containerization and Docker
  • Getting started with Docker

Docker Images and Containers

  • What is an image
  • Pulling images from a Docker registry
  • Managing images locally
  • Running containers
  • Interacting with containers

Creating Docker Images

  • Creating a simple Docker image
  • The layered filesystem of Docker images
  • A closer look at Dockerfile instructions
  • Parameterizing Docker containers
  • Multi-stage builds

Docker Persistence

  • The need for persistence
  • Persisting data within a container
  • Persisting data in a volume
  • Using the VOLUME instruction in a Dockerfile
  • Additional persistence techniques

Docker Networking

  • Using default networking in Docker
  • Creating a user-defined network
  • Additional types of network

Introduction to Docker Compose

  • Getting started with Docker Compose
  • Specifying dependencies between services
  • Defining health checks
  • Defining a restart policy for services

Environment Variables

  • Setting the scene
  • Defining environment variables with Docker
  • Defining environment variables with Docker Compose

Configurations and Secrets

  • Defining configs
  • Defining secrets

Managing Volumes and Networks

  • Defining and using volumes via Docker Compose
  • Additional volume techniques
  • Defining and using networks via Docker Compose
  • Additional network techniques

Working with Multiple Compose Files

  • Setting the scene
  • Including Compose files
  • Extending a Compose file
  • Merging Compose files