开发工具:
文件大小: 6mb
下载次数: 0
上传时间: 2019-07-21
详细说明:刚在官方买的,在此分享给喜欢docker的众多运维朋友,希望大家一起进步!lOSE
BY NC ND
Some rights reserved No part of this publication may be reproduced, stored in a
retrieval system, or transmitted in any form or by any means, electronic,
mechanical or photocopying, recording, or otherwise, for commercial purposes
without the prior permission of the publisher
This work is licensed under the creative commons
Attribution-Non Commercial-NoDerivs 3.0 Unported License. To view a copy of
this license. visit here
C Copyright 2015-James Turnbull
9m780988820203
Contents
Page
Foreword
Who is this book for?
a note about versions
Credits and Acknowledgments................
Technical reviewers
Scott collier
John ferlito
Pris nasrat
Technical illustrator
Proofreader
122333444
Author
Conventions in the book
Code and Examples
Colophon
Errata
Version
Chapter 1 Introduction
Introducing Docker
An easy and lightweight way to model reality
A logical segregation of duties
4455556788999
Fast, efficient development life cycle
Encourages service oriented architecture
Docker components
Docker client and server
10
Contents
Docker images
12
Registries
12
Containers
13
Compose, Swarm and Kubernetes .......,..... 14
What can you use Docker for?
14
Docker with configuration management
15
Docker's technical components
16
What's in the book?
17
Docker resources .........
18
Chapter 2 Installing docker
19
Requirements
21
Installing on Ubuntu and Debian
21
Checking for prerequisites
22
Installing Docker
24
Docker and uFw
26
Installing on Red Hat and family
27
Checking for prerequisites
28
Installing Docker
28
Starting the Docker daemon on the Red Hat family
31
Docker for mac
32
Installing Docker for Mac
33
Testing Docker for Mac
34
Docker for Windows installation
34
Installing Docker for Windows
35
Testing Docker for Windows
36
Using Docker on OSX and Windows with this book
36
Docker installation script
37
Binary installatio
38
The docker daemon
39
Configuring the Docker daemon
40
Checking that the docker daemon is running
42
Upgrading Docker
44
Docker user interface
44
Summary
45
Version: v18.09(6172afc)
Contents
Chapter 3 Getting Started with Docker
46
Ensuring docker is ready
46
Running our first container
48
Working with our first container
51
Container naming
54
Starting a stopped container
55
Attaching to a container
56
Creating demonized containers
57
Seeing what's happening inside our container
58
Docker log drivers
60
Inspecting the container's processes
Docker statistics
,,,62
Running a process inside an already running container.,........ 63
Stopping a demonized container........
Automatic container restarts
65
Finding out more about our container
66
Deleting a container
,,,,,,69
Summary..,..,,,,,,,,,,,,,,
70
Chapter 4 Working with Docker images and repositories
71
What is a Docker image?
7
Listing Docker images
,,.74
alling images
78
Searching for images
80
Building our own images
82
Creating a Docker Hub account
82
Using Docker commit to create images
84
Building images with a Dockerfile
87
Building the image from our Dockerfile.............. 91
What happens if an instruction fails?
垂··
94
Dockerfiles and the build cache
96
Using the build cache for templating
97
Viewing our new image
.98
Launching a container from our new image
Dockerfile instructions
,,,,,,,,,104
Version: v18.09(6172afc)
Contents
Pushing images to the Docker Hub
127
Automated Builds
130
Deleting an image
133
Running your own Docker registry
135
Running a registry from a container.............
136
Testing the new registry
136
Alternative Indexes....
138
Quay...
138
Summary
138
Chapter 5 Testing with Docker
Using Docker to test a static website
,,,,,.141
An initial Dockerfile for the Sample website
,,,,,,.,,,141
Building our Sample website and nginx image
145
Building containers from our Sample website and nginx image . 147
Editing our website
150
USing Docker to build and test a web application
...152
Building our Sinatra application
152
Creating our Sinatra container
154
Extending our Sinatra application to use Redis
,,,,159
Connecting our Sinatra application to the Redis container
164
Docker internal networking
165
Docker networking ............... 171
Connecting containers summary
,,182
Using Docker for continuous integration
183
Build a jenkins and docker server
184
Create a new Jenkins job
,,,,,,190
Running our Jenkins job
.196
Next steps with our Jenkins job
,,,,,,,,,,,198
Summary of our Jenkins setup
看
199
Multi-configuration Jenkins
199
Create a multi-configuration job
199
Testing our multi-configuration job
204
Summary of our multi-configuration Jenkins
206
Other alternatives
,,,,,,,,,,,,,,,,,,,,,,,,207
Version: v18.09(6172afc)
Contents
Drone
207
Shippable
207
Summary
207
Chapter 6 Building services with Docker
208
Building our first application...........
.208
The jekyll base image
,,..209
Building the Jekyll base image
210
The apache image
212
Building the Jekyll Apache image
214
Launching our Jekyll site
215
Updating our Jekyll site
,,,,,,.218
Backing up our Jekyll volume
,,,,,,,,,,,220
Extending our Jekyll website example
222
Building a java application server with Docker
222
A WAR file fetcher
,,,,,,223
Fetching a War file
....225
Our Tomcat 7 application server
226
Running our WAR file
228
Building on top of our Tomcat application server
229
A multi-container application stack
233
e node s image
234
e Redis base image
237
The Redis primary image
239
he Redis replica image
240
Creating our Redis back-end cluster
241
Creating our node container
,,,,,.248
Capturing our application logs
.249
Summary of our Node stack............. 253
Managing Docker containers without SSH
看
254
Summary......
255
Chapter 7 Docker Orchestration and Service Discovery
256
Docker compose
257
Installing Docker Compose
258
Version: v18.09(6172afc)
Contents
Getting our sample application
259
The docker-compose yml file
263
Running compose
266
Using Com pose
268
Compose in summary
272
Consul, Service Discovery and Docker
272
Building a consul image
274
Testing a Consul container locally
.278
Running a consul cluster in docker
280
Starting the Consul bootstrap node
283
Starting the remaining nodes
286
Running a distributed service with Consul in Docker
,,294
Docker swarm
,,,,,,,,,,,,,,,,.,,,,,,,,,,,,307
Understanding the swarm
308
Installing Swarm
309
Setting up a Swarn
309
Running a service on your Swarm
314
Orchestration alternatives and components
,,,,,.,,,,319
Fleet and etcd
,,320
Kubernetes
,,,,,320
Apache mesos
320
Helios
320
Centurion
321
Summary
321
Chapter 8 Using the Docker API
322
The docker apis
,,,,,,322
First steps with the Engine APi
323
Testing the Docker Engine API................ 327
Managing images with the aPI
看
328
Managing containers with the aPi
330
Improving the TProv application
335
Authenticating the Docker Engine API
340
Create a Certificate Authority
341
Create a server certificate signing request and key ......... 343
Version: v18.09(6172afc)
Contents
Configuring the Docker daemon
347
Creating a client certificate and key
348
Configuring our docker client for authentication .......... 351
Summary
353
Chapter 9 Getting help and extending Docker
354
Getting help
.,,,,,,,..,,,,,,,,,..,,.355
The docker forums
,,,,,,,,,,,,,,,,,,,,,,,,355
Docker on irc
355
Docker on github
355
Reporting issues for Docker
,356
Setting up a build environment
356
Install Docker
,,,,,,.,,,357
Install source and build tools
357
Check out the source
,,,,357
Contributing to the documentation
,,,,,,358
Build the environment
...358
Running the tests
.361
Use Docker inside our development environment
363
Submitting a pull request
363
Merge approval and maintainers
365
Summary
366
List of Figures
368
List of Listings
382
Index
383
Version: v18.09(6172afc)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.