Shipping Reliable Containers in Production
Sean P. Kane, Karl Matthias
Docker#
Up&Running#
deploy#
Compose#
AWS#
dependency#
deeper#
scale#
workflow#
Kubernetes#
Docker and Linux containers have fundamentally changed the way that organizations develop, deliver, and run software at scale. But understanding why these tools are important and how they can be successfully integrated into your organization's ecosystem can be challenging. This fully updated guide provides developers, operators, architects, and technical managers with a thorough understanding of the Docker tool set and how containers can improve almost every aspect of modern software delivery and management.
This edition includes significant updates to the examples and explanations that reflect the substantial changes that have occurred since Docker was first released almost a decade ago. Sean Kane and Karl Matthias have updated the text to reflect best practices and to provide additional coverage of new features like BuildKit, multi-architecture image support, rootless containers, and much more.
Table of Contents
Chapter 1. Introduction
Chapter 2. The Docker Landscape
Chapter 3. Installing Docker
Chapter 4. Working with Docker Images
Chapter 5. Working with Containers
Chapter 6. Exploring Docker
Chapter 7. Debugging Containers
Chapter 8. Exploring Docker Compose
Chapter 9. The Path to Production Containers
Chapter 10. Containers at Scale
Chapter 11. Advanced Topics
Chapter 12. The Expanding Landscape
Chapter 13. Container Platform Design
Chapter 14. Conclusion
This book is designed for anyone who needs a practical understanding of Linux containers and how they can be used to improve development and production practices. Most modern integration workflows and production systems require developers and operations engineers to have a firm understanding of Linux containers and how they can be leveraged to significantly improve repeatability and predictability across the system. Along the way we’ll explore how to build, test, deploy, and debug Linux containers within the Docker ecosystem. We’ll also cover a few of the significant orchestration tools that leverage Linux containers. And finally, we’ll round all of that out with some guidance on security and best practices for your container environment.
Who Should Read This Book?
This book is intended for anyone who is looking to solve the complex workflow problems involved in developing and deploying software to production at scale. If you’re interested in Linux containers, Docker, Kubernetes, DevOps, and large, scalable, software infrastructures, then this book is for you.
Why Read This Book?
Today there are many conversations, projects, and articles on the internet about Docker, and some of them have even started predicting the demise of Docker.
So why should you devote precious hours to reading this book?
Although there are other alternatives today, Docker single-handedly made Linux containers accessible to all engineers. Before Docker created the container image format and helped build many of the core libraries used in containerization systems today, Linux containers were very difficult to use and primarily remained the tools of very large cloud-hosting companies that needed to provide scalability while also protecting their systems from untrusted user code.
Docker changed all of that.
Even though there is a lot of information about Docker and Linux containers out there, the landscape is still actively evolving, and best practices are shifting. Imagine that you just read a blog post, published four years ago, about Docker. It might still work, but it might not be the best approach anymore. During the time it took us to write the first edition of this book, Docker, Inc., released four versions of Docker plus a few major tools into their ecosystem. In the seven years between the first and third editions of this book, the landscape has changed significantly. Docker has stabilized, and there are now many additional tools that fill similar roles. Instead of suffering from a complete lack of tools, there are now many robust choices for almost every aspect of the DevOps workflow. Wrapping your arms around the scope of what Linux containers and Docker provide, understanding how they fit into your workflow, and getting all the various integrations right are not trivial tasks.
We have worked with multiple companies for over nine years building and operating a mix of production Linux container platforms, including Docker, Mesos, and Kubernetes. We originally implemented Docker in production only months after its release and can share with you some of the experience we gained from evolving our production platforms since then. Our goal with this book is for you to benefit from this experience by avoiding many of the bumps in the road that we suffered through. Even though the online documentation for the Docker project is very useful, we will attempt to give you a much bigger picture and expose you to many of the best practices that we have learned along the way.
When you finish this book, you should have enough information to understand what Linux containers are, what Docker provides, why they are important, and how you can leverage them to streamline everything from local development through production. It should be a fascinating trip through a few interesting technologies that have some very practical applications.
"Docker: Up and Running moves past the Docker honeymoon and prepares you for the realities of running containers in production."
- Kelsey Hightower
Principal Developer Advocate,
Google Cloud Platform
"Docker: Up and Running takes you from the basic underlying concepts to invaluable practical lessons learned from running Docker at scale."
- Liz Rice
Chief Open Source Officer,
"This is one of my favorite books on Docker! I always recommend it to anyone who is looking at Docker for the first time."
- Ksenia Burlachenko
Engineering Manager,
Pilot.com
"Docker: Up and Running will steer you towards building modern, reliable and highly available distributed systems."
- Mihai Todor
Senior Principal Engineer,
TLCP
"A few years ago, I had to switch my workflow away from virtual machines and start focusing on containers. For me, the best way to understand how something works is by getting hands-on experience as a user, and only then diving into the technology. Docker: Up and Running made the process of getting hands-on with Docker and containers a smooth process, allowing me to easily get up to speed with containers."
- Fabiano Fidêncio
Cloud Orchestration Software Engineer,
Intel Corporation
Sean Kane is the founder of techlabs.sh and a Principal Production Operations engineer at SuperOrbital. Sean specializes in engineering, teaching, and writing about modern devops processes, including Kubernetes, Docker, Terraform, and more. He has had a long career in production operations, with many diverse roles across a broad range of industries. Sean is the lead inventor on a container-related patent and spends a lot of his spare time writing, teaching, and speaking about technology. He is an avid traveler, hiker, and camper and lives in the US Pacific Northwest with his wife, children, and dogs.
Karl Matthias is VP of Architecture at Community.com and has previously worked at several well known tech companies, where he has held a number of very senior engineering and leadership roles for more than 25 years. He is an enthusiast of hard problems, distributed systems, Go, Ruby, Elixir, scalable datastores, automated infrastructure, and repeatable systems.