Book Image

Docker Deep Dive

By : Nigel Poulton
Book Image

Docker Deep Dive

By: Nigel Poulton

Overview of this book

Most applications, even the funky cloud-native microservices ones, need high-performance, production-grade infrastructure to run on. Having impeccable knowledge of Docker will help you to thrive in the modern cloud-first world. With this book, you’ll gain the skills you need to work with Docker and its containers. The book begins with an introduction to containers and explains its functionality and application in the real world. You’ll then get an overview of VMware, Kubernetes, and Docker and learn to install Docker on Windows, Mac, and Linux. Once you’ve understood the Ops and Dev perspective of Docker, you’ll be able to see the big picture and understand what Docker exactly does. The book then turns its attention to the more technical aspects, guiding your through practical exercises covering Docker engine, Docker images, and Docker containers. You’ll learn techniques for containerizing an app, deploying apps with Docker Compose, and managing cloud-native applications with Swarm. You’ll also build Docker networks and Docker overlay networks and handle applications that write persistent data. Finally, you’ll deploy apps with Docker stacks and secure your Docker environment. By the end of this book, you’ll be well-versed in Docker and containers and have developed the skills to create, deploy, and run applications on the cloud.
Table of Contents (3 chapters)

10: Docker Swarm

Now that we know how to install Docker, pull images, and work with containers, the next thing we need is a way to work with things at scale. That’s where Docker Swarm comes into play.

As usual, we’ll split this chapter into the usual three parts:

  • The TLDR
  • The deep dive
  • The commands

Docker Swarm - The TLDR

Docker Swarm is two main things:

  1. An enterprise-grade secure cluster of Docker hosts
  2. An engine for orchestrating microservices apps

On the clustering front, Swarm groups one or more Docker nodes and lets you manage them as a cluster. Out-of-the-box, you get an encrypted distributed cluster store, encrypted networks, mutual TLS, secure cluster join tokens, and a PKI that makes managing and rotating certificates a breeze. You can even non-disruptively add and remove nodes. It’s a beautiful thing.

While we cover some aspects of Swarm security in this chapter, we go a lot deeper in Chapter 15.

On the orchestration front, Swarm...