Docker: Up & Running: Shipping Reliable Containers in Production, 3rd Edition

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

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. • Learn how Docker and Linux containers integrate with cloud services and Kubernetes • Experience building OCI images, plus deploying and managing Linux containers with powerful command-line tools • Understand how OCI images simplify dependency management and deployment workflow for your applications • Learn practical techniques for deploying and testing Linux containers in production • Deploy production containers at scale wherever you need them • Explore advanced Docker topics, including deployment tools, networking, orchestration, security, and configuration

Author(s): Sean P. Kane
Edition: 3
Publisher: O'Reilly Media
Year: 2023

Language: English
Commentary: True EPUB (Retail Copy)
Pages: 422

Foreword
Preface
Who Should Read This Book
Why Read This Book?
Navigating This Book
Conventions Used in This Book
Using Code Examples
O’Reilly Online Learning
How to Contact Us
Acknowledgments
1. Introduction
The Promise of Docker
Benefits of the Docker Workflow
What Docker Isn’t
Important Terminology
Wrap-Up
2. The Docker Landscape
Process Simplification
Broad Support and Adoption
Architecture
Client/Server Model
Network Ports and Unix Sockets
Robust Tooling
Docker Command-Line Tool
Docker Engine API
Container Networking
Getting the Most from Docker
Containers Are Not Virtual Machines
Limited Isolation
Containers Are Lightweight
Toward an Immutable Infrastructure
Stateless Applications
Externalizing State
The Docker Workflow
Revision Control
Building
Testing
Packaging
Deploying
The Docker Ecosystem
Wrap-Up
3. Installing Docker
Docker Client
Linux
macOS, Mac OS X
Microsoft Windows 11
Docker Server
systemd-Based Linux
Non-Linux VM-Based Server
Testing the Setup
Ubuntu
Fedora
Alpine Linux
Exploring the Docker Server
Wrap-Up
4. Working with Docker Images
Anatomy of a Dockerfile
Building an Image
Running Your Image
Build Arguments
Environment Variables as Configuration
Custom Base Images
Storing Images
Public Registries
Private Registries
Authenticating to a Registry
Running a Private Registry
Optimizing Images
Keeping Images Small
Layers Are Additive
Utilizing the Layer Cache
Directory Caching
Troubleshooting Broken Builds
Debugging Pre-BuildKit Images
Debugging BuildKit Images
Multiarchitecture Builds
Wrap-Up
5. Working with Containers
What Are Containers?
History of Containers
Creating a Container
Basic Configuration
Storage Volumes
Resource Quotas
Starting a Container
Auto-Restarting a Container
Stopping a Container
Killing a Container
Pausing and Unpausing a Container
Cleaning Up Containers and Images
Windows Containers
Wrap-Up
6. Exploring Docker
Printing the Docker Version
Server Information
Downloading Image Updates
Inspecting a Container
Exploring the Shell
Returning a Result
Getting Inside a Running Container
docker container exec
docker volume
Logging
docker container logs
More Advanced Logging
Monitoring Docker
Container Statistics
Container Health Checks
docker system events
cAdvisor
Prometheus Monitoring
Exploration
Wrap-Up
7. Debugging Containers
Process Output
Process Inspection
Controlling Processes
Network Inspection
Image History
Inspecting a Container
Filesystem Inspection
Wrap-Up
8. Exploring Docker Compose
Configuring Docker Compose
Launching Services
Exploring Rocket.Chat
Exercising Docker Compose
Managing Configuration
Default Values
Mandatory Values
The dotenv File
Wrap-Up
9. The Path to Production Containers
Getting to Production
Docker’s Role in Production Environments
Job Control
Resource Limits
Networking
Configuration
Packaging and Delivery
Logging
Monitoring
Scheduling
Service Discovery
Production Wrap-Up
Docker and the DevOps Pipeline
Quick Overview
Outside Dependencies
Wrap-Up
10. Containers at Scale
Docker Swarm Mode
Kubernetes
Minikube
Docker Desktop-Integrated Kubernetes
Kind
Amazon ECS and Fargate
Core AWS Setup
IAM Role Setup
AWS CLI Setup
Container Instances
Tasks
Testing the Task
Stopping the Task
Wrap-Up
11. Advanced Topics
Containers in Detail
cgroups
Namespaces
Security
UID 0
Rootless Mode
Privileged Containers
Secure Computing Mode
SELinux and AppArmor
The Docker Daemon
Advanced Configuration
Networking
Storage
nsenter
Debugging Shell-less Containers
The Structure of Docker
Swapping Runtimes
gVisor
Wrap-Up
12. The Expanding Landscape
Client Tools
nerdctl
podman and buildah
All-in-One Developer Tools
Rancher Desktop
Podman Desktop
Wrap-Up
13. Container Platform Design
The Twelve-Factor App
Codebase
Dependencies
Config
Backing Services
Build, Release, Run
Processes
Port Binding
Concurrency
Disposability
Development/Production Parity
Logs
Admin Processes
Twelve-Factor Wrap-Up
The Reactive Manifesto
Responsive
Resilient
Elastic
Message Driven
Wrap-Up
14. Conclusion
The Road Ahead
The Challenges Docker Addresses
The Docker Workflow
Minimizing Deployment Artifacts
Optimizing Storage and Retrieval
The Payoff
The Final Word
Index
About the Authors