售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Title Page
Copyright and Credits
Learn Docker – Fundamentals of Docker 18.x
Packt Upsell
Why subscribe?
PacktPub.com
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
What Are Containers and Why Should I Use Them?
Technical requirements
What are containers?
Why are containers important?
What's the benefit for me or for my company?
The Moby project
Docker products
Docker CE
Docker EE
The container ecosystem
Container architecture
Summary
Questions
Further reading
Setting up a Working Environment
Technical requirements
The Linux command shell
PowerShell for Windows
Using a package manager
Installing Homebrew on a Mac
Installing Chocolatey on Windows
Choosing a code editor
Docker Toolbox
Docker for Mac and Docker for Windows
Installing Docker for Mac
Installing Docker for Windows
Using docker-machine on Windows with Hyper-V
Minikube
Installing Minikube on Mac and Windows
Testing Minikube and kubectl
Summary
Questions
Further reading
Working with Containers
Technical requirements
Running the first container
Starting, stopping, and removing containers
Running a random quotes container
Listing containers
Stopping and starting containers
Removing containers
Inspecting containers
Exec into a running container
Attaching to a running container
Retrieving container logs
Logging drivers
Using a container-specific logging driver
Advanced topic – changing the default logging driver
Anatomy of containers
Architecture
Namespaces
Control groups (cgroups)
Union filesystem (UnionFS)
Container plumbing
Runc
Containerd
Summary
Questions
Further reading
Creating and Managing Container Images
What are images?
The layered filesystem
The writable container layer
Copy-on-write
Graph drivers
Creating images
Interactive image creation
Using Dockerfiles
The FROM keyword
The RUN keyword
The COPY and ADD keywords
The WORKDIR keyword
The CMD and ENTRYPOINT keywords
A complex Dockerfile
Building an image
Multistep builds
Dockerfile best practices
Saving and loading images
Sharing or shipping images
Tagging an image
Image namespaces
Official images
Pushing images to a registry
Summary
Questions
Further reading
Data Volumes and System Management
Technical requirements
Creating and mounting data volumes
Modifying the container layer
Creating volumes
Mounting a volume
Removing volumes
Sharing data between containers
Using host volumes
Defining volumes in images
Obtaining Docker system information
Listing resource consumption
Pruning unused resources
Pruning containers
Pruning images
Pruning volumes
Pruning networks
Pruning everything
Consuming Docker system events
Summary
Questions
Further reading
Distributed Application Architecture
What is a distributed application architecture?
Defining the terminology
Patterns and best practices
Loosely coupled components
Stateful versus stateless
Service discovery
Routing
Load balancing
Defensive programming
Retries
Logging
Error handling
Redundancy
Health checks
Circuit breaker pattern
Running in production
Logging
Tracing
Monitoring
Application updates
Rolling updates
Blue-green deployments
Canary releases
Irreversible data changes
Rollback
Summary
Questions
Further reading
Single-Host Networking
Technical requirements
The container network model
Network firewalling
The bridge network
The host network
The null network
Running in an existing network namespace
Port management
Summary
Questions
Further reading
Docker Compose
Technical requirements
Demystifying declarative versus imperative
Running a multi-service app
Scaling a service
Building and pushing an application
Summary
Questions
Further reading
Orchestrators
What are orchestrators and why do we need them?
The tasks of an orchestrator
Reconciling the desired state
Replicated and global services
Service discovery
Routing
Load balancing
Scaling
Self-healing
Zero downtime deployments
Affinity and location awareness
Security
Secure communication and cryptographic node identity
Secure networks and network policies
Role-based access control (RBAC)
Secrets
Content trust
Reverse uptime
Introspection
Overview of popular orchestrators
Kubernetes
Docker Swarm
Apache Mesos and Marathon
Amazon ECS
Microsoft ACS
Summary
Questions
Further reading
Introduction to Docker Swarm
Architecture
Swarm nodes
Swarm managers
Swarm workers
Stacks, services, and tasks
Services
Task
Stack
Multi-host networking
Creating a Docker Swarm
Creating a local single node swarm
Creating a local swarm in VirtualBox or Hyper-V
Using Play with Docker (PWD) to generate a Swarm
Creating a Docker Swarm in the cloud
Deploying a first application
Creating a service
Inspecting the service and its tasks
Logs of a service
Reconciling the desired state
Deleting a service or a stack
Deploying a multi-service stack
The swarm routing mesh
Summary
Questions
Further reading
Zero Downtime Deployments and Secrets
Technical requirements
Zero downtime deployment
Popular deployment strategies
Rolling updates
Health checks
Rollback
Blue–green deployments
Canary releases
Secrets
Creating secrets
Using a secret
Simulating secrets in a development environment
Secrets and legacy applications
Updating secrets
Summary
Questions
Further reading
Introduction to Kubernetes
Technical requirements
Architecture
Kubernetes master nodes
Cluster nodes
Introduction to Minikube
Kubernetes support in Docker for Desktop
Pods
Comparing Docker container and Kubernetes pod networking
Sharing the network namespace
Pod life cycle
Pod specification
Pods and volumes
Kubernetes ReplicaSet
ReplicaSet specification
Self-healing
Kubernetes deployment
Kubernetes service
Context-based routing
Comparing SwarmKit with Kubernetes
Summary
Questions
Further reading
Deploying, Updating, and Securing an Application with Kubernetes
Technical requirements
Deploying a first application
Deploying the web component
Deploying the database
Streamlining the deployment
Zero downtime deployments
Rolling updates
Blue–green deployment
Kubernetes secrets
Manually defining secrets
Creating secrets with kubectl
Using secrets in a pod
Secret values in environment variables
Summary
Questions
Further reading
Running a Containerized App in the Cloud
Technical requirements
Deploying our application into AWS ECS
Introduction to ECS
Creating a Fargate ECS cluster of AWS
Authoring a task definition
Running a task in ECS
Modifying the task definition
Adding the database component to the application
Deploying and using Docker EE on AWS
Provisioning the infrastructure
Installing Docker
Installing Docker UCP
Remote admin the UCP cluster
Deploying to Docker Swarm
Deploying to Kubernetes
A short peek into Azure’s container offerings
A short peek into Google’s container offerings
Summary
Questions
Further reading
Assessment
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
Chapter 12
Chapter 13
Chapter 14
Other Books You May Enjoy
Leave a review - let other readers know what you think
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜