Docker in Action, Second Edition teaches you the skills and knowledge you need to create, deploy, and manage applications hosted in Docker containers. This bestseller has been fully updated with new examples, best practices, and a number of entirely new chapters. Foreword by Bret Fisher, Docker Captain and Container Consultant.
About the Technology
The idea behind Docker is simple—package just your application and its dependencies into a lightweight, isolated virtual environment called a container. Applications running inside containers are easy to install, manage, and remove. This simple idea is used in everything from creating safe, portable development environments to streamlining deployment and scaling for microservices. In short, Docker is everywhere.
About the Book
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.
What's inside
• Running software in containers
• Packaging software for deployment
• Securing and distributing containerized applications
About the Reader
Written for developers with experience working with Linux.
About the Author
Jeff Nickoloff and Stephen Kuenzli have designed, built, deployed, and operated highly available, scalable software systems for nearly 20 years.
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
# Docker in Action, Second Edition — Reading Guide
【One-Line Pitch】
A practical, hands-on guide for Linux developers who want to master Docker containers—from running your first container to building, securing, and orchestrating production-grade applications. If you're ready to move beyond "it works on my machine" and understand containers deeply, this is your book.
【Book Arc】
- **Opening (~0%–6%)**: Sets the stage for why Docker matters—solving the "junk drawer" problem of tangled dependencies, messy filesystems, and fragile deployments. The authors explain their scope choices: Linux/macOS focus, Swarm over Kubernetes for orchestration, and why they skip cloud-specific platforms.
- **Early (~6%–19%)**: Introduces the core mental model—images as shipping containers, containers as isolated runtime environments. Walks through the anatomy of `docker run`, the image resolution process, and how containers organize dependencies that would otherwise sprawl across a host system.
- **Early (~19%–28%)**: Dives into running software in containers: detached daemons, process isolation via PID namespaces, and the security benefits of namespace separation. Includes practical exercises using `docker exec` to inspect container internals.
- **Early–Middle (~28%–38%)**: Covers container lifecycle management—states, starting/stopping, linking containers, and environment variable injection. Uses a WordPress + MySQL example to show real-world dependency handling and configuration patterns.
- **Middle (~38%–47%)**: Explores durable containers and image management: building images, understanding repositories and tags, and the composite key system (repository name + tag) that identifies images. Includes a fun "scavenger hunt" exercise to reinforce image discovery skills.
【Key Takeaways】
- **Containers solve dependency chaos** (Early): By isolating applications with their dependencies into images, Docker eliminates the "junk drawer" problem of conflicting libraries and versions on a shared host. The storage overhead concern is addressed by Docker's layered packaging system.
- **`docker run` is a multi-step pipeline** (Early): When you run a container, Docker checks locally, then pulls from a registry, installs image layers, and starts the program—all in one command. Understanding this flow demystifies what's happening under the hood.
- **Namespaces are the security backbone** (Early): PID namespaces prevent processes in one container from seeing or controlling processes in others, limiting attack surface. You can opt out with `--pid` flags when you need host-level process visibility for admin tasks.
- **Detached mode is for daemons** (Early): Use `--detach` or `-d` for background services like web servers that don't need a terminal. Attached mode is for interactive or foreground processes.
- **Environment variables are the configuration interface** (Early–Middle): Inject settings like `WORDPRESS_DB_HOST` via `--env` flags rather than hardcoding. This pattern makes containers portable across environments—critical for production deployments.
- **Container startup order matters** (Early–Middle): Docker enforces dependency chains—you can't link to a non-running container. Start dependencies first, then dependent containers, or use orchestration to manage this automatically.
- **Tags are flexible aliases, not just versions** (Middle): A single image can have multiple tags (e.g., `11-stretch`, `11.0.4-jdk-stretch`), letting you choose between "always latest" and "pinned exact version" strategies. Tags also encode configuration variants like "behind a load balancer."
【Reading Tips】
- **Skim the opening chapters** (~0%–6%) if you're already convinced Docker is useful—the "why" material is well-written but not essential for hands-on work.
- **Deep-read the namespace and isolation sections** (~19%–28%): These are the conceptual foundation for everything security-related later. The `docker exec` exercises are worth doing, not just reading.
- **Follow along with the WordPress example** (~28%–38%): It's the first realistic multi-container scenario and teaches linking, environment injection, and dependency ordering in one coherent project.
- **Do the scavenger hunt** (~44%–47%): It's a clever way to practice image discovery and removal commands (`docker run`, `docker rmi`) in a low-stakes, game-like format.
- **Don't worry about Windows-specific issues**: The authors explicitly scope to Linux/macOS, so if you're on Windows, focus on the concepts and adapt commands as needed.
【Coverage Limits】
The excerpts cover roughly the first half of the book (through image management and tags). Later chapters on building custom images, securing containers, and orchestration with Swarm are not covered in this guide.
Excerpt 1
sher M A N N I N G For Jarrod Nickoloff and William Kuenzli x CONTENTS PART 2 PACKAGING SOFTWARE FOR DISTRIBUTION.......123 7...
nd, networking, graphics, and so on. Others depend on stan- dard libraries for the language they’re written in. Some depend on other applications, such as th...
y setting the --pid flag on docker create or docker run and setting the value to host. Try it yourself with a container running BusyBox Linux and the ps Linu...
, use the image tagged with 11-stretch. It should always be assigned to the newest release of Java 11. These tags give users great flexibility. It’s also com...
Linux provides a mechanism to make mount points read-only. You can do this by adding the readonly=true argument to the mount specification. In the example, y...
ad, they are network attachment types with special meaning. When you specify the --network host option on a docker run command, you are telling Docker to cre...
you’ll see that the file could be written to the directory that’s owned by user 2000. Not only that, but any container that uses a user or group with write a...
hole file is first copied from the read-only layer into the writable layer before the change is made. This has a negative impact on runtime per- formance and...
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Add Tag
Enter tag name (max 50 characters)
Share E-Book
Docker in Action (Jeff Nickoloff, Stephen Kuenzli) (Z-Library)
Scan QR code with your phone to access
Copy the link or scan the QR code to access this e-book on your phone
Share E-Book via Email
Please enter email address
Donation Statistics
¥.00
Total Donations
0
Donation Count
Docker in Action (Jeff Nickoloff, Stephen Kuenzli) (Z-Library)
Find Your Favorite Books
Only registered users can comment after logging in. Comments need to be reviewed by administrators before being displayed
Loading comments...
Reply to Comment
Edit Comment