注冊 | 登錄讀書好,好讀書,讀好書!
讀書網(wǎng)-DuShu.com
當前位置: 首頁出版圖書科學技術計算機/網(wǎng)絡軟件工程及軟件方法學第一本Docker書

第一本Docker書

第一本Docker書

定 價:¥59.00

作 者: (澳)James Turnbull 著; 李兆海,劉斌,巨震 譯
出版社: 人民郵電出版社
叢編項:
標 簽: 計算機/網(wǎng)絡 軟件工程/開發(fā)項目管理

ISBN: 9787115377333 出版時間: 2014-12-01 包裝: 平裝
開本: 16 頁數(shù): 252 字數(shù):  

內(nèi)容簡介

  本書由Docker 公司前服務與支持副總裁James Turnbull 編寫,是權威的Docker 開發(fā)指南。本書會指導讀者完成Docker 的安裝、部署、管理和擴展,帶領讀者經(jīng)歷從測試到生產(chǎn)的整個開發(fā)生命周期,讓讀者了解Docker 適用于什么場景。書中先介紹Docker 及其組件的基礎知識,然后用Docker 構建容器和服務來完成各種任務:利用Docker 為新項目建立測試環(huán)境,演示如何使用持續(xù)集成的工作流集成Docker,如何構建應用程序服務和平臺,如何使用Docker 的API,如何擴展Docker。本書適合對Docker 或容器開發(fā)感興趣的系統(tǒng)管理員、運維人員和開發(fā)人員閱讀。

作者簡介

  作者簡介James Turnbull是一位技術作家,還是一名開源極客。他最近的大作是一本講述流行開源日志工具的書——The LogStash Book。James還寫了兩本關于Puppet的書,一本是Pro Puppet以,另一本是較早的Pulling Strings with Puppet: Configuration Management Made Easy。此外,James還寫了Pro Linux System Administration、Pro Nagios 2.0和Hardening Linux這三本書。James真正的工作是Kickstarter的工程副總裁。之前,James曾擔任Docker公司服務與支持副總裁、Venmo公司工程副總裁和Puppet Labs的技術運維副總裁。James熱愛美食、美酒、閱讀、攝影,還很喜歡貓咪,但對在海灘上手牽手散步卻并不熱衷。譯者簡介李兆海 網(wǎng)名Googol Lee。使用Googol這個名字真的是因為“10的100次方”這個意思,和后來的Google公司沒有一點兒關系。多年后端程序員,早期以C、C++為主,后來轉向Python,現(xiàn)在以Go為生。曾寫過《Golang初探》發(fā)表于2011年2月號《程序員》。Docker早期使用者。平時喜歡亂翻書,遇到感興趣的都會研究一番。Twitter賬戶@googollee。劉斌 具有10余年軟件開發(fā)經(jīng)驗,關注后臺開發(fā)技術和各種編程語言。做過電子商務、金融、企業(yè)系統(tǒng)以及Android手機開發(fā);寫過Delphi,也兼做系統(tǒng)管理員和DBA(現(xiàn)在都改叫DevOps了);既做后臺應用,也要調用前臺CSS和JavaScript,可還是不敢自稱Full Stack;今又舶來Growth Hacker,我想我要做一個Growth Engineer。巨震 北京大學軟件工程碩士,服務器端開發(fā)者。目前就職于創(chuàng)業(yè)公司,使用Node.js、Golang進行服務器端開發(fā)。2013年底開始研究Docker,是Docker中文社區(qū)的活躍貢獻者,負責Docker技術文章和視頻的翻譯、校對工作。生活中喜歡美食、騎行,熱衷于PC硬件,喜愛折騰,熱愛一切計算機相關的技術,堅信技術改變世界。最崇拜的技術傳奇人物是前id Software首席程序員、現(xiàn)Oculus VR首席技術官John Carmack。

圖書目錄

目錄
第1 章 簡介····································1 1.1 Docker 簡介·····························2 1.1.1 提供一個簡單、輕量的建模方式·························2 1.1.2 職責的邏輯分離················3 1.1.3 快速、高效的開發(fā)生命周期··3 1.1.4 鼓勵使用面向服務的架構·····3 1.2 Docker 組件·····························3 1.2.1 Docker 客戶端和服務器·······4 1.2.2 Docker 鏡像······················4 1.2.3 Registry ···························5 1.2.4 容器·······························5 1.3 我們能用Docker 做什么·············6 1.4 Docker 與配置管理····················7 1.5 Docker 的技術組件····················8 1.6 本書的內(nèi)容·····························9 1.7 Docker 資源··························· 10 第2 章 安裝Docker ······················· 11 2.1 安裝Docker 的先決條件··········· 12 2.2 在Ubuntu 中安裝Docker ·········· 13 2.2.1 檢查前提條件················· 14 2.2.2 安裝Docker ···················· 16 2.2.3 Docker 與UFW ··············· 17 2.3 在Red Hat 和Red Hat 系發(fā)行版中安裝Docker ···························17 2.3.1 檢查前提條件················· 18 2.3.2 安裝Docker···················· 19 2.3.3 在Red Hat 系發(fā)行版中啟動Docker 守護進程·············· 20 2.4 在OS X 中安裝Boot2Docker ····· 21 2.4.1 在OS X 中安裝Boot2Docker ··················· 21 2.4.2 在OS X 中啟動Boot2Docker ··················· 22 2.4.3 測試Boot2Docker ············ 23 2.5 在Windows 中安裝Boot2Docker 23 2.5.1 在Windows 中安裝Boot2Docker ··················· 23 2.5.2 在Windows 中啟動Boot2Docker ··················· 24 2.5.3 測試Boot2Docker ············ 25 2.6 使用本書的Boot2Docker 示例···· 25 2.7 Docker 安裝腳本····················· 26 2.8 二進制安裝··························· 27 2.9 Docker 守護進程····················· 28 2.9.1 配置Docker 守護進程······· 28 2.9.2 檢查Docker 守護進程是否正在運行······················· 30 2.10 升級Docker ························· 31 2.11 Docker 圖形用戶界面············· 31 2.12 小結··································· 32 第3 章 Docker 入門······················ 33 3.1 確保Docker 已經(jīng)就緒·············· 33 3.2 運行我們的第一個容器············ 34 3.3 使用第一個容器····················· 36 3.4 容器命名······························ 38 3.5 重新啟動已經(jīng)停止的容器·········· 39 3.6 附著到容器上························ 39 3.7 創(chuàng)建守護式容器····················· 40 3.8 容器內(nèi)部都在干些什么············ 41 3.9 查看容器內(nèi)的進程·················· 42 3.10 在容器內(nèi)部運行進程·············· 43 3.11 停止守護式容器···················· 44 3.12 自動重啟容器······················· 44 3.13 深入容器····························· 45 3.14 刪除容器····························· 46 3.15 小結··································· 47 第4 章 使用Docker 鏡像和倉庫······· 49 4.1 什么是Docker 鏡像················· 49 4.2 列出鏡像······························ 51 4.3 拉取鏡像······························ 54 4.4 查找鏡像······························ 56 4.5 構建鏡像······························ 57 4.5.1 創(chuàng)建Docker Hub 賬號······· 58 4.5.2 用Docker 的commit 命令創(chuàng)建鏡像······················· 59 4.5.3 用Dockerfile構建鏡像······················· 61 4.5.4 基于Dockerfile構建新鏡像····················· 64 4.5.5 指令失敗時會怎樣············ 66 4.5.6 Dockerfile 和構建緩存·· 67 4.5.7 基于構建緩存的Dockerfile模板····························· 67 4.5.8 查看新鏡像···················· 68 4.5.9 從新鏡像啟動容器··········· 69 4.5.10 Dockerfile 指令········· 72 4.6 將鏡像推送到Docker Hub········· 83 4.7 刪除鏡像······························ 88 4.8 運行自己的Docker Registry······· 90 4.8.1 從容器運行Registry ········· 90 4.8.2 測試新Registry ··············· 91 4.9 其他可選Registry 服務············· 92 4.10 小結··································· 92 第5 章 在測試中使用Docker··········· 93 5.1 使用Docker 測試靜態(tài)網(wǎng)站········ 93 5.1.1 Sample 網(wǎng)站的初始Dockerfile ················· 94 5.1.2 構建Sample 網(wǎng)站和Nginx鏡像····························· 96 5.1.3 從Sample 網(wǎng)站和Nginx 鏡像構建容器······················· 97 5.1.4 修改網(wǎng)站······················ 100 5.2 使用Docker 構建并測試Web應用程序·············································· 101 5.2.1 構建Sinatra 應用程序······ 101 5.2.2 創(chuàng)建Sinatra 容器············ 102 5.2.3 構建Redis 鏡像和容器····· 104 5.2.4 連接到Redis 容器··········· 106 5.2.5 連接Redis····················· 108 5.2.6 讓Docker 容器互連········· 110 5.2.7 使用容器連接來通信······· 114 5.3 Docker 用于持續(xù)集成·············· 116 5.3.1 構建Jenkins 和Docker服務器························· 117 5.3.2 創(chuàng)建新的Jenkins 作業(yè)······121 5.3.3 運行Jenkins 作業(yè)············124 5.3.4 與Jenkins 作業(yè)有關的下一步·························126 5.3.5 Jenkins 設置小結·············126 5.4 多配置的Jenkins····················126 5.4.1 創(chuàng)建多配置作業(yè)·············126 5.4.2 測試多配置作業(yè)·············130 5.4.3 Jenkins 多配置作業(yè)小結····132 5.5 其他選擇·····························132 5.5.1 Drone ···························132 5.5.2 Shippable ······················132 5.6 小結···································132 第6 章 使用Docker 構建服務·········133 6.1 構建第一個應用····················133 6.1.1 Jekyll 基礎鏡像···············134 6.1.2 構建Jekyll 基礎鏡像········135 6.1.3 Apache 鏡像···················135 6.1.4 構建Jekylll Apache 鏡像···136 6.1.5 啟動Jekylll 網(wǎng)站·············137 6.1.6 更新Jekyll 網(wǎng)站··············140 6.1.7 備份Jekyll 卷·················141 6.1.8 擴展Jekyll 示例網(wǎng)站········142 6.2 使用Docker 構建一個Java應用服務·····························143 6.2.1 WAR 文件的獲取器·········143 6.2.2 獲取WAR 文件··············144 6.2.3 Tomecat7 應用服務器·······145 6.2.4 運行WAR 文件··············146 6.2.5 基于Tomcat 應用服務器的構建服務······················147 6.3 多容器的應用?!ぁぁぁぁぁぁぁぁぁぁぁぁぁぁぁぁぁぁぁ?50 6.3.1 Node.js 鏡像··················150 6.3.2 Redis 基礎鏡像··············· 153 6.3.3 Redis 主鏡像·················· 154 6.3.4 Redis 從鏡像·················· 155 6.3.5 創(chuàng)建Redis 后端集群········ 156 6.3.6 創(chuàng)建Node 容器·············· 160 6.3.7 捕獲應用日志················ 161 6.3.8 Node 程序棧的小結········· 164 6.4 不使用SSH 管理Docker 容器··· 164 6.5 小結··································· 166 第7 章 使用Fig 編配Docker·········· 167 7.1 Fig ····································· 168 7.1.1 安裝Fig ······················· 168 7.1.2 獲取示例應用················ 169 7.1.3 fig.yml 文件··············· 172 7.1.4 運行Fig ······················· 173 7.1.5 使用Fig ······················· 175 7.1.6 Fig 小結······················· 178 7.2 Consul、服務發(fā)現(xiàn)和Docker ····· 178 7.2.1 構建Consul 鏡像············ 179 7.2.2 在本地測試Consul 容器··· 182 7.2.3 使用Docker 運行Consul集群···························· 184 7.2.4 啟動具有自啟動功能的Consul 節(jié)點··················· 186 7.2.5 啟動其余節(jié)點················ 188 7.2.6 配合Consul,在Docker里運行一個分布式服務···· 193 7.3 其他編配工具和組件·············· 201 7.3.1 Fleet 和etcd··················· 202 7.3.2 Kubernetes····················· 202 7.3.3 Apache Mesos················· 202 7.3.4 Helios ·························· 202 7.3.5 Centurion ······················ 203 7.3.6 Libswarm ······················203 7.4 小結···································203 第8 章 使用Docker API ················205 8.1 Docker API ···························205 8.2 初識Remote API····················206 8.3 測試Docker Remote API ··········207 8.3.1 通過API 來管理Docker鏡像····························208 8.3.2 通過API 管理Docker容器····························211 8.4 改進TProv 應用····················213 8.5 對Docker Remote API 進行認證··217 8.5.1 建立證書授權中心···········218 8.5.2 創(chuàng)建服務器的證書簽名請求和密鑰·························220 8.5.3 配置Docker 守護進程······222 8.5.4 創(chuàng)建客戶端證書和秘鑰·····223 8.5.5 配置Docker 客戶端開啟認證功能······················224 8.6 小結···································226 第9 章 獲得幫助和對Docker進行改進··························· 227 9.1 獲得幫助····························· 227 9.1.1 Docker 用戶和開發(fā)郵件列表······················ 228 9.1.2 IRC 上的Docker ············· 228 9.1.3 GitHub 上的Docker ········· 228 9.2 報告Docker 的問題················ 229 9.3 搭建構建環(huán)境······················· 229 9.3.1 安裝Docker··················· 229 9.3.2 安裝源代碼和構建工具···· 229 9.3.3 檢出源代碼··················· 230 9.3.4 貢獻文檔······················ 230 9.3.5 構建開發(fā)環(huán)境················ 231 9.3.6 運行測試······················ 232 9.3.7 在開發(fā)環(huán)境中使用Docker··· 233 9.3.8 發(fā)起pull request ············· 234 9.3.9 批準合并和維護者·········· 236 9.4 小結··································· 236

本目錄推薦

掃描二維碼
Copyright ? 讀書網(wǎng) m.ranfinancial.com 2005-2020, All Rights Reserved.
鄂ICP備15019699號 鄂公網(wǎng)安備 42010302001612號