Book Image

Mastering Docker - Third Edition

By : Russ McKendrick, Scott Gallagher
Book Image

Mastering Docker - Third Edition

By: Russ McKendrick, Scott Gallagher

Overview of this book

Docker has been a game-changer when it comes to how modern applications are deployed and created. It has now grown into a key driver of innovation beyond system administration, with an impact on the world of web development. But how can you make sure you're keeping up with the innovations it's driving, or be sure you're using it to its full potential? Mastering Docker shows you how; this book not only demonstrates how to use Docker more effectively, but also helps you rethink and reimagine what's possible with it. You will cover concepts such as building, managing, and storing images, along with best practices to make you confident, before delving more into Docker security. You'll find everything related to extending and integrating Docker in new and innovative ways. Docker Compose, Docker Swarm, and Kubernetes will help you take control of your containers in an efficient manner. By the end of the book, you will have a broad, yet detailed, sense of what's possible with Docker, and how seamlessly it fits in with a range of other platforms and tools.
Table of Contents (17 chapters)

Docker and the container ecosystem

If you have been following the rise of Docker and containers, you will have noticed that, over the period of the last few years, the messaging on the Docker website has been slowly changing, from headlines about what containers are to more of a focus on the services provided by Docker as a company.

One of the core drivers for this is that everything has traditionally been lumped into being known just as "Docker," which can get confusing. Now that people do not need educating as much on what a container is or the problems they can solve with Docker, the company needed to try and start to differentiate themselves from other companies that sprung up to support all sorts of container technologies.

So, let's try and unpick everything that is Docker, which involves the following:

  • Open source projects: There are several open source projects started by Docker, which are now maintained by a large community of developers.
  • Docker CE and Docker EE: This is the core collection of free-to-use and commercially supported Docker tools built on top of the open source components.
  • Docker, Inc.: This is the company founded to support and develop the core Docker tools.

We will also be looking at some third-party services in later chapters. In the meantime, let's go into more detail on each of these, starting with the open source projects.

Open source projects

Docker, Inc. has spent the last two years open sourcing and donating a lot of its core projects to various open source foundations and communities. These projects include the following:

  • Moby Project is the upstream project upon which the Docker Engine is based. It provides all of the components needed to assemble a fully functional container system.
  • Runc is a command-line interface for creating and configuring containers, and has been built to the OCI specification.
  • Containerd is an easily embeddable container runtime. It is also a core component of the Moby Project.
  • LibNetwork is a Go library that provides networking for containers.
  • Notary is a client and server that aims to provide a trust system for signed container images.
  • HyperKit is a toolkit that allows you to embed hypervisor capabilities into your own applications, presently it only supports the macOS and the Hypervisor.framework.
  • VPNKit provides VPN functionality to HyperKit.
  • DataKit allows you to orchestrate application data using a Git-like workflow.
  • SwarmKit is a toolkit that allows you to build distributed systems using the same raft consensus algorithm as Docker Swarm.
  • LinuxKit is a framework that allows you to build and compile a small portable Linux operating system for running containers.
  • InfraKit is a collection of tools that you can use to define infrastructure to run your LinuxKit generated distributions on.

On their own, you will probably never use the individual components; however, each of the projects mentioned is a component of the tools which are maintained by Docker, Inc. We will go a little more into these projects in our final chapter.

Docker CE and Docker EE

There are a lot of tools supplied and supported by Docker, Inc. Some we have already mentioned, and others we will cover in later chapters. Before we finish this, our first chapter, we should get an idea of the tools we are going to be using. The most of important of them is the core Docker Engine.

This is the core of Docker, and all of the other tools that we will be covering use it. We have already been using it as we installed it in the Docker installation and Docker commands sections of this chapter. There are currently two versions of Docker Engine; there is the Docker Enterprise Edition (EE) and the Docker Community Edition (CE). We will be using Docker CE throughout this book.

From September 2018, the release cycle for the stable version of Docker CE will be biannual, which means that it will have a seven-month maintenance cycle. This means that you have plenty of time to review and plan any upgrades. At the time of writing, the current timetable for Docker CE releases is:

  • Docker 18.06 CE: This is the last of the quarterly Docker CE releases, released July 18th 2018.
  • Docker 18.09 CE: This release, due late September/early October 2018, is the first release of the biannual release cycle of Docker CE.
  • Docker 19.03 CE: The first supported Docker CE of 2019 is scheduled to be released March/April 2019.
  • Docker 19.09 CE: The second supported release of 2019 is scheduled to be released September/October 2019.

As well as the stable version of Docker CE, Docker will be providing nightly builds of the Docker Engine via a nightly repository (formally Docker CE Edge), and also monthly builds of Docker for Mac and Docker for Windows via the Edge channel.

Docker also provides the following tools and services:

  • Docker Compose: A tool that allows you to define and share multi-container definitions; it is detailed in Chapter 5, Docker Compose.
  • Docker Machine: A tool to launch Docker hosts on multiple platforms; we will cover this in Chapter 7, Docker Machine.
  • Docker Hub: A repository for your Docker images, covered in the next three chapters.
  • Docker Store: A storefront for official Docker images and plugins as well as licensed products. Again, we will cover this in the next three chapters.
  • Docker Swarm: A multi-host-aware orchestration tool, covered in detail in Chapter 8, Docker Swarm.
  • Docker for Mac: We have covered Docker for Mac in this chapter.
  • Docker for Windows: We have covered Docker for Windows in this chapter.
  • Docker for Amazon Web Services: A best-practice Docker Swarm installation that targets AWS, covered in Chapter 10, Running Docker in Public Clouds.
  • Docker for Azure: A best-practice Docker Swarm installation that targets Azure, covered in Chapter 10, Running Docker in Public Clouds.

Docker, Inc.

Docker, Inc. is the company formed to develop Docker CE and Docker EE. It also provides SLA-based support services for Docker EE. Finally, they are offer consultative services to companies who wish take their existing applications and containerize them as part of Docker's Modernize Traditional Apps (MTA) program.