-
第一部分 Docker 核心基礎
-
1. 容器技術與 Docker 基礎概念
- 1.1 什麼是容器與容器化
- 1.2 Docker 的主從式架構
- 1.3 Docker 核心三大元素
- 1.4 本章小結與動手練習
-
2. 開發環境準備與第一個容器
- 2.1 Docker Desktop 安裝、設定與背景原理
- 2.2 5 分鐘快速上手實驗:第一個 hello-world 容器
- 2.3 深度剖析:當我們輸入 docker run 時,背景到底發生了什麼事?
- 2.4 本章小結與動手練習
-
3. Docker 常用 CLI 指令操作實務
- 3.1 鏡像管理
- 3.2 容器生命週期
- 3.3 狀態與日誌監控
- 3.4 容器除錯
- 3.5 一條龍實戰:用 Nginx 串起日常指令
- 3.6 開發日常實用:Docker 指令組合技
- 3.7 本章小結與動手練習
-
1. 容器技術與 Docker 基礎概念
-
第二部分 Dockerfile 深度解析與建置最佳實踐
-
4. Dockerfile 指令詳解與鏡像分層原理
- 4.1 鏡像分層機制與 Union FS 原理
- 4.2 核心指令詳解與最佳實踐
- 4.3 實務練習:撰寫安全、高效的 Node.js Dockerfile
- 4.4 本章小結與動手練習
-
5. 鏡像優化與建置策略
- 5.1 多階段建置
- 5.2 建置快取與 Layer 順序優化
- 5.3 供應鏈安全與版本鎖定
- 5.4 實務範例:TypeScript/Node 多階段 Dockerfile
- 5.5 本章小結與動手練習
-
6. 持久化資料與容器網路配置
- 6.1 資料持久化機制:Volumes 與 Bind Mounts
- 6.2 Volumes(資料卷)——生產環境首選
- 6.3 Bind Mounts(綁定掛載)——本地開發與熱重載
- 6.4 容器網路模式與安全通訊
- 6.5 本章小結與動手練習
-
4. Dockerfile 指令詳解與鏡像分層原理
-
第三部分 多容器協同與本地開發工作流
-
7. Docker Compose 多容器協同管理
- 7.1 微服務與多容器部署的痛點
- 7.2 什麼是 Docker Compose?
- 7.3 實戰:撰寫
compose.yaml - 7.4 一鍵管理指令
- 7.5 Docker Compose 的定位與極限:何時轉向 Kubernetes?
- 7.6 本章小結與動手練習
-
8. 企業級本地開發工作流(以 Python FastAPI 為例)
- 8.1 Compose Watch:檔案同步與熱重載
- 8.2 本地 PostgreSQL 與密鑰保護
- 8.3 程式碼品質把關
- 8.4 實戰:FastAPI 本地開發環境配置
- 8.5 本章小結與動手練習
-
7. Docker Compose 多容器協同管理
-
第四部分 架構深度、安全與生態編排
-
9. Docker 底層架構解析與安全對比(含 Podman)
- 9.1 Linux 核心隔離:Namespaces 與 Cgroups
- 9.2 容器運行時鏈:Docker Engine、containerd 與 runc
- 9.3 Docker 的安全局限與 Podman 對照
- 9.4 Docker 與 Podman 決策對照
- 9.5 進階實務:Podman 特色指令與 Quadlet
- 9.6 本章小結與動手練習
-
10. 邁向雲端:從 Compose 到生產級 Kubernetes 編排
- 10.1 Docker Compose 與 Kubernetes:單機與叢集
- 10.2 什麼是容器編排?
- 10.3 Kubernetes 叢集架構速覽
- 10.4 最小部署單元:Pod
- 10.5 現代 Kubernetes 運行方式:CRI 與容器運行時
- 10.6 本章小結、動手練習與全書收束
-
9. Docker 底層架構解析與安全對比(含 Podman)
-
實驗
- 實驗 1 在 Google Cloud VM 上建立 Docker 實驗環境
- 實驗 2 在 GCP VM 自架 n8n
- 實驗 3 在 GCP VM 自架 Supabase
-
附錄
- 附錄 1 以 MobaXterm 產生 SSH 金鑰並寫入 GCP VM(Windows)
- 附錄 2 以 Antigravity Remote-SSH 連線並編輯 GCP VM
- 附錄 3 在 Google Cloud 建立 Ubuntu VM 並安裝 Docker Engine
Docker 實踐手冊
從容器基礎、Compose 到 Kubernetes
從觀念走到實作的 Docker 實踐手冊。十章涵蓋容器基礎、Dockerfile、資料與網路、Compose,以及通往 Kubernetes 的橋接;實驗在 Google Cloud 虛擬機上自架 Docker、n8n 與 Supabase
Minimum price
$12.00
$15.00
You pay
Author earns
About
About the Book
《Docker 實踐手冊》帶你把 Docker 學成一套可複用的做法。書從容器與虛擬機的差異、主從式架構,以及 Image、Container、Registry 三大元素講起,接著安裝環境、跑起第一個容器,並把日常 CLI、容器生命週期與除錯收成可複習的操作鏈。
進階部分拆解 Dockerfile 的分層原理與常用指令,再以多階段建置、快取與版本鎖定把鏡像做得更小、更快、更可重現;同時處理資料卷、綁定掛載與容器網路。Compose 部分把網路與資料卷收成一份 compose.yaml,並以 Python FastAPI 示範熱更新、資料庫串接與密鑰分級。最後兩章看到 Namespaces、Cgroups 與 containerd/runc 運行時鏈,對照 Podman 的安全模型,並說明從單機 Compose 走到生產級 Kubernetes 時,中間要經過的建置、倉庫與掃描。
實驗把練習搬上 Google Cloud 的 Ubuntu 虛擬機,從自架 Docker 環境,做到 n8n 與 Supabase,讓本機學到的觀念能在真實 Linux 宿主機上重做一次。
這本書怎麼安排
第一部分:容器觀念、開發環境與常用指令
第二部分:Dockerfile、鏡像優化、資料與網路
第三部分:Compose 與 FastAPI 本地開發
第四部分:運行時、Podman,以及通往 Kubernetes 的橋接
實驗與附錄:在 Google Cloud VM 上自架環境,並附上連線與安裝步驟
Author
About the Author
Contents
Table of Contents
Get the free sample chapters
Click the buttons to get the free sample in PDF or EPUB, or read the sample online here
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
Write and Publish on Leanpub
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.