O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Docker Compose in Depth

Video Description

As more and more developers are learning, Docker is a fantastic tool for “containerizing” and running applications repeatably. You’ve probably even Dockerized a few applications yourself. With the advent of micro-architectures, however, even the most modestly-sized systems are composed of numerous containers, all working in conjunction. Starting one container manually is easy, but start any more than a few and you’re in for a real headache. Enter Docker Compose. Compose is a tool from the folks at Docker that makes it easy to define and run application environments made up of multiple Docker containers. Throughout this course, you’ll learn Compose from top to bottom. To begin, we’ll cover the basics of `docker-compose.yml` syntax and the `docker-compose` CLI tool. We’ll then move on to an exhaustive tour of Compose’s features, including: - Linking containers - Using environment variables - Controlling container startup order - Mounting and sharing volumes inside an environment - Partitioning environments via Compose “extensions” - Customizing container networks The course is organized into logical sections, meaning it’s easy to digest en masse or ad hoc, depending on your needs. In the final section of the course, we’ll apply what you’ve learned to create a large environment for a ficticious legacy system that requires many of the features covered. When you’re finished with the course, you should have the knowledge and confidence to create your own flexible application environments. Whether you apply what you’ve learned on the job or at home, you’ll save time and avoid mistakes by being able to quickly and repeatably run your system.

Table of Contents

  1. Section 1 - Introduction
    1. Section 1 Introduction 00:02:07
    2. Compose at a High-level 00:03:13
    3. Installing Compose 00:01:14
    4. Compose at the Terminal 00:01:50
    5. Section 1 Summary 00:00:27
  2. Section 2 - Compose Basics
    1. Section 2 Introduction 00:00:16
    2. Introducing the Sample Wordpress Environment 00:01:01
    3. A Sample "version 1" Environment for Wordpress 00:04:42
    4. From Version 1 to Version 2 00:04:42
    5. Persisting the Database with a Volume 00:02:28
    6. How Restarts Work 00:02:37
    7. Adding a Dependency 00:02:52
    8. Section 2 Conclusion 00:00:27
  3. Section 3 - Networks
    1. Section 3 Introduction 00:00:18
    2. Networking Overview 00:01:38
    3. The Default Network 00:02:52
    4. How Updates Affect Networking 00:00:31
    5. Isolating Containers 00:02:26
    6. Using External Networks 00:03:10
    7. Aliases & Container Names 00:03:11
    8. Links 00:01:32
    9. Section 3 Summary 00:00:55
  4. Section 4 - Volumes
    1. Section 4 Introduction 00:00:17
    2. Volumes Overview 00:00:48
    3. Simple Volumes 00:03:27
    4. Named Volumes 00:03:32
    5. Fine-grained Volume Configuration 00:02:37
    6. Section 4 Summary 00:00:21
  5. Section 5 - Logging
    1. Section 5 Introduction 00:00:10
    2. Configuring Logging 00:02:57
    3. Forwarding Logs 00:01:47
    4. Section 5 Summary 00:00:22
  6. Section 6 - The Compose CLI
    1. Section 6 Introduction 00:00:28
    2. Configuring Compose 00:02:32
    3. Bringing an Environment Up 00:02:01
    4. Changing a Running Environment 00:02:04
    5. Introspecting on an Environment 00:03:42
    6. Taking an Environment Down 00:01:03
    7. Environment Files 00:02:56
    8. Section 6 Summary 00:00:37
  7. Section 7 - Composing Compose
    1. Section 7 Introduction 00:00:47
    2. The File Argument 00:03:36
    3. The Default Override File 00:02:54
    4. The 'extends' configuration 00:01:14
    5. Running Additional Services 00:01:52
    6. Section 7 Summary 00:00:30
  8. Section 8 - Compose in Production
    1. Section 8 Introduction 00:00:54
    2. Introducing the Sample Environment 00:04:36
    3. Building a Swarm Cluster 00:07:13
    4. Deploying to a Swarm Cluster 00:03:38
    5. Next Steps 00:03:14
    6. Section 8 Summary 00:00:29