Docker in Action, Second Edition

Book description

Docker in Action, Second Edition teaches you to create, deploy, and manage applications hosted in Docker containers running on Linux. Fully updated, with four new chapters and revised best practices and examples, this second edition begins with a clear explanation of the Docker model. Then, you go hands-on with packaging applications, testing, installing, running programs securely, and deploying them across a cluster of hosts. With examples showing how Docker benefits the whole dev lifecycle, you’ll discover techniques for everything from dev-and-test machines to full-scale cloud deployments.

Table of contents

  1. Copyright
  2. Brief Table of Contents
  3. Table of Contents
  4. Praise for the first edition
  5. Foreword
  6. Preface
  7. Acknowledgments
  8. About this book
  9. About the authors
  10. About the cover illustration
  11. Chapter 1. Welcome to Docker
  12. Part 1. Process isolation and environment-independent computing
    1. Chapter 2. Running software in containers
      1. 2.1. Controlling containers: Building a website monitor
      2. 2.2. Solved problems and the PID namespace
      3. 2.3. Eliminating metaconflicts: Building a website farm
      4. 2.4. Building environment-agnostic systems
      5. 2.5. Building durable containers
      6. 2.6. Cleaning up
      7. Summary
    2. Chapter 3. Software installation simplified
      1. 3.1. Identifying software
      2. 3.2. Finding and installing software
      3. 3.3. Installation files and isolation
      4. Summary
    3. Chapter 4. Working with storage and volumes
      1. 4.1. File trees and mount points
      2. 4.2. Bind mounts
      3. 4.3. In-memory storage
      4. 4.4. Docker volumes
      5. 4.5. Shared mount points and sharing files
      6. 4.6. Cleaning up volumes
      7. 4.7. Advanced storage with volume plugins
      8. Summary
    4. Chapter 5. Single-host networking
      1. 5.1. Networking background (for beginners)
      2. 5.2. Docker container networking
      3. 5.3. Special container networks: host and none
      4. 5.4. Handling inbound traffic with NodePort publishing
      5. 5.5. Container networking caveats and customizations
      6. Summary
    5. Chapter 6. Limiting risk with resource controls
      1. 6.1. Setting resource allowances
      2. 6.2. Sharing memory
      3. 6.3. Understanding users
      4. 6.4. Adjusting OS feature access with capabilities
      5. 6.5. Running a container with full privileges
      6. 6.6. Strengthening containers with enhanced tools
      7. 6.7. Building use-case-appropriate containers
      8. Summary
  13. Part 2. Packaging software for distribution
    1. Chapter 7. Packaging software in images
      1. 7.1. Building Docker images from a container
      2. 7.2. Going deep on Docker images and layers
      3. 7.3. Exporting and importing flat filesystems
      4. 7.4. Versioning best practices
      5. Summary
    2. Chapter 8. Building images automatically with Dockerfiles
      1. 8.1. Packaging Git with a Dockerfile
      2. 8.2. A Dockerfile primer
      3. 8.3. Injecting downstream build-time behavior
      4. 8.4. Creating maintainable Dockerfiles
      5. 8.5. Using startup scripts and multiprocess containers
      6. 8.6. Building hardened application images
      7. Summary
    3. Chapter 9. Public and private software distribution
      1. 9.1. Choosing a distribution method
      2. 9.2. Publishing with hosted registries
      3. 9.3. Introducing private registries
      4. 9.4. Manual image publishing and distribution
      5. 9.5. Image source-distribution workflows
      6. Summary
    4. Chapter 10. Image pipelines
      1. 10.1. Goals of an image build pipeline
      2. 10.2. Patterns for building images
      3. 10.3. Record metadata at image build time
      4. 10.4. Testing images in a build pipeline
      5. 10.5. Patterns for tagging images
      6. Summary
  14. Part 3. Higher-level abstractions and orchestration
    1. Chapter 11. Services with Docker and Compose
      1. 11.1. A service “Hello World!”
      2. 11.2. Declarative service environments with Compose V3
      3. 11.3. Stateful services and preserving data
      4. 11.4. Load balancing, service discovery, and networks with Compose
      5. Summary
    2. Chapter 12. First-class configuration abstractions
      1. 12.1. Configuration distribution and management
      2. 12.2. Separating application and configuration
      3. 12.3. Secrets—A special kind of configuration
      4. Summary
    3. Chapter 13. Orchestrating services on a cluster of Docker hosts with Swarm
      1. 13.1. Clustering with Docker Swarm
      2. 13.2. Deploying an application to a Swarm cluster
      3. 13.3. Communicating with services running on a Swarm cluster
      4. 13.4. Placing service tasks on the cluster
      5. Summary
  15. Docker running three containers on a Linux system
  16. Index
  17. List of Figures
  18. List of Tables

Product information

  • Title: Docker in Action, Second Edition
  • Author(s): Jeffrey Nickoloff, Stephen Kuenzli
  • Release date: November 2019
  • Publisher(s): Manning Publications
  • ISBN: 9781617294761