Docker in Practice, Second Edition cover

Docker in Practice, Second Edition

Rating 4.5
Chapters
32
ISBN
9787115541109

Tags

Summary

Docker in Practice, Second Edition is the Chinese translation of the second edition of Docker in Practice, translated by Yang Rui, Wu Jiaxing, Liang Xiaoyong, and Huang Bowen. Organized in a problem–solution–discussion handbook format, the book breaks the full chain—from development environments and continuous delivery to production deployment—into 114 specific techniques. Each technique is grounded in a real-world scenario and provides operational steps and trade-off analysis. The content is divided into five parts: Part 1, Docker Fundamentals, introduces core concepts of containers and images and the layering mechanism, then goes deeper into the Docker daemon, client, registry, and Docker Hub; Part 2, Docker and Development, covers using containers as lightweight virtual machines, building lean images, persisting data with volumes, and day-to-day cleanup, inspection, and command-line tools; Part 3, Docker and DevOps, covers continuous integration and continuous delivery pipelines, containerizing Jenkins, distributing images across environments, and simulating network failures; Part 4, Orchestration from Single Host to Cloud, discusses Compose, Consul service discovery, Swarm, Kubernetes, OpenShift, Mesos/Marathon, and platform selection; Part 5, Docker in Production, focuses on security hardening, going live, and the various challenges encountered in operation. The book references Docker 1.13, reflecting the container ecosystem's shift from single-host use to the orchestration era, and includes the original example code for hands-on practice.

Editor's review

市面上讲 Docker 的入门书不少,但真正讲“怎么在真实团队里用起来”的不多,这本书正好补上了这一块。它不是从命令手册到命令手册的流水账,而是把开发、测试、构建、交付、上线串成一条线,用114个技巧回答“遇到这个问题该怎么办”。 对读者最友好的地方在于“问题—解决方案—讨论”的结构:先说你为什么会碰到这个麻烦,再给可直接照做的步骤,最后解释为什么这样解决、还有什么替代方案。这种写法让它可以当工具书翻,遇到镜像太大、构建太慢、容器数据丢失、跨环境部署不一致时,直接查对应章节即可。 第2版在保留经典技巧的基础上补入了 Kubernetes、Swarm、OpenShift、Mesos 等编排内容,并新增生产环境安全与落地章节,视野从“在本机跑个容器”扩展到“在集群里稳定运行服务”。书中技巧虽以 Docker 1.13 为参考,具体命令与版本可能已显陈旧,但排查思路、镜像治理方法和流水线设计逻辑并不过时,仍适合作为团队内部分享与落地的参考读物。

Who it's for

A good fit for

  • 已会基本 Linux 命令,想把 Docker 用到实际项目里的开发者
  • 负责构建、发布与部署流程的 DevOps 工程师与运维人员
  • 正在推进容器化改造、需要评估编排方案的技术负责人
  • 希望把持续集成与持续交付流水线容器化的团队骨干

Not a good fit for

  • 完全没有 Linux 与命令行基础的零起点读者
  • 只想快速查询最新版 Docker 命令速查表的人
  • 主要关注前端框架或算法、对部署运维无需求的读者

Reading tips

  1. 先通读第一部分打牢镜像、容器、分层与注册中心的概念,再按需跳读其他技巧。
  2. 把114个技巧当作检查清单,对照自己项目中的构建慢、镜像大、配置漂移等问题逐条试验。
  3. 读到编排章节时,结合一个真实小项目分别用 Compose、Swarm 和 Kubernetes 部署一遍做对比。
  4. 注意书中参考版本为 Docker 1.13,动手时同步查阅官方文档,核对待废弃或已变更的命令。

About the publisher

Posts & Telecom Press China · Founded in 1953

Posts & Telecom Press is known for its strengths in science and technology, computing, and information and communications titles, and has extended its publishing into photography, art, software learning, and inspirational growth, giving it a fairly diverse range. Its catalog includes computing and communications works such as Refactoring and Patterns (Revised Edition) and Huawei Switch Learning Guide (Second Edition), alongside bilingual collector's editions such as The Little Prince (Chinese-English-French illustrated collector's edition), The Great Gatsby, and Three Days to See. Beijing Ten Years: 1980-1990 and Ghost Blade: WLOP Personal Illustration Collection reflect its presence in photography and art. Its authors include Antoine de Saint-Exupéry, Helen Keller, Joshua Kerievsky, Wang Da, Zhang Zhaozeng, and WLOP.

Contents

  1. Part 1 Docker Fundamentals
  2. Chapter 1 Getting Started with Docker
  3. 1.1 What Docker Is and Why Use It
  4. 1.2 Building a Docker Application
  5. 1.3 Summary
  6. Chapter 2 Understanding Docker—Inside the Engine Room
  7. 2.1 Docker Architecture
  8. 2.2 The Docker Daemon (Techniques 1–3)
  9. 2.3 The Docker Client (Techniques 4–8)
  10. 2.4 The Docker Registry (Technique 9)
  11. 2.5 Docker Hub (Technique 10)
  12. Part 2 Docker and Development
  13. Chapter 3 Using Docker as a Lightweight Virtual Machine (Techniques 11–19)
  14. Chapter 4 Building Images (Techniques 20–28)
  15. Chapter 5 Running Containers (Techniques 29–40)
  16. Chapter 6 Docker Day to Day (Techniques 41–48)
  17. Chapter 7 Configuration Management—Keeping Everything in Order (Techniques 49–60)
  18. Part 3 Docker and DevOps
  19. Chapter 8 Continuous Integration: Speeding Up the Development Pipeline (Techniques 61–69)
  20. Chapter 9 Continuous Delivery: A Perfect Fit with Docker Principles (Techniques 70–75)
  21. Chapter 10 Network Simulation: Painless Real-World Testing (Techniques 76–81)
  22. Part 4 Orchestration from Single Host to Cloud
  23. Chapter 11 Getting Started with Container Orchestration (Techniques 82–86)
  24. Chapter 12 Using Docker to Make the Data Center the Operating System (Techniques 87–92)
  25. Chapter 13 The Docker Platform
  26. Part 5 Docker in Production
  27. Chapter 14 Docker and Security
  28. Chapter 15 Smooth Sailing: Running Docker in Production
  29. Chapter 16 Docker Production Practices—Meeting the Challenges
  30. Appendix A Installing and Using Docker
  31. Appendix B Docker Configuration
  32. Appendix C Vagrant

FAQ

这本书是第1版还是第2版?
本条目对应的是第2版,2020年10月由人民邮电出版社出版,ISBN 为 9787115541109,译者为杨锐、吴佳兴、梁晓勇、黄博文。第1版是2018年2月出版的,ISBN 为 9787115474582,技巧数量为101个。
零基础能直接读这本书吗?
不太建议。作者在前言中说明读者需具备一定的容器管理和运维基础知识,书中很多技巧默认你会用 Linux 命令行、看得懂 Dockerfile。完全零基础的话,建议先看一本 Docker 入门书或官方 Get Started 教程。
书中的技术是否已经过时?
本书编写时参考的 Docker 版本是 1.13,因此部分具体命令、工具参数和生态项目(如某些编排组件的版本)已与当下有差距。但镜像分层优化、构建缓存、数据卷持久化、CI/CD 流水线设计等思路依然适用,建议配合官方最新文档阅读。
书中技巧有没有配套代码?
有。异步社区该书页面提供“原书代码”作为配套资源,可免费下载。建议边读边把技巧在本地环境跑一遍,比单纯阅读更容易记住细节。
这本书适合当工具书查阅吗?
适合。全书以“问题—解决方案—讨论”组织,每个技巧相对独立,可以从目录或索引直接定位到具体问题,例如镜像精简、时区设置、容器清理、跨环境部署等,适合放在手边随查随用。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

More by the same author

Top rated in the same category