Using Docker : Developing and Deploying Software with Containers
معرفی کتاب «Using Docker : Developing and Deploying Software with Containers» نوشتهٔ Adrian Mouat، منتشرشده توسط نشر O'Reilly Media در سال 2016. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «Using Docker : Developing and Deploying Software with Containers» در دستهٔ بدون دستهبندی قرار دارد.
Docker containers offer simple, fast and robust methods for developing, distributing and running software, especially in dynamic and distributed environments. With this hands-on guide, you'll learn why containers are so important, what you'll gain by adopting Docker, and how to make it part of your development process Copyright 4 Table of Contents 7 Preface 13 Who Should Read This Book 13 Why I Wrote This Book 13 Navigating This Book 14 Conventions Used in This Book 14 Using Code Examples 15 Safari® Books Online 15 How to Contact Us 16 Acknowledgments 16 Part I. Background and Basics 19 Chapter 1. The What and Why of Containers 21 Containers Versus VMs 22 Docker and Containers 24 Docker: A History 26 Plugins and Plumbing 28 64-Bit Linux 28 Chapter 2. Installation 31 Installing Docker on Linux 31 Run SELinux in Permissive Mode 32 Running Without sudo 33 Installing Docker on Mac OS or Windows 33 A Quick Check 35 Chapter 3. First Steps 37 Running Your First Image 37 The Basic Commands 38 Building Images from Dockerfiles 42 Working with Registries 45 Private Repositories 47 Using the Redis Official Image 48 Conclusion 51 Chapter 4. Docker Fundamentals 53 The Docker Architecture 53 Underlying Technologies 54 Surrounding Technologies 55 Docker Hosting 57 How Images Get Built 57 The Build Context 57 Image Layers 59 Caching 61 Base Images 62 Dockerfile Instructions 64 Connecting Containers to the World 67 Linking Containers 67 Managing Data with Volumes and Data Containers 69 Sharing Data 71 Data Containers 72 Common Docker Commands 73 The run Command 74 Managing Containers 77 Docker Info 80 Container Info 80 Dealing with Images 81 Using the Registry 84 Conclusion 85 Part II. The Software Lifecycle with Docker 87 Chapter 5. Using Docker in Development 89 Say “Hello World!” 89 Automating with Compose 99 The Compose Workflow 101 Conclusion 102 Chapter 6. Creating a Simple Web App 103 Creating a Basic Web Page 104 Taking Advantage of Existing Images 106 Add Some Caching 111 Microservices 114 Conclusion 115 Chapter 7. Image Distribution 117 Image and Repository Naming 117 The Docker Hub 118 Automated Builds 120 Private Distribution 122 Running Your Own Registry 122 Commerical Registries 129 Reducing Image Size 129 Image Provenance 131 Conclusion 132 Chapter 8. Continuous Integration and Testing with Docker 133 Adding Unit Tests to Identidock 134 Creating a Jenkins Container 139 Triggering Builds 146 Pushing the Image 147 Responsible Tagging 147 Staging and Production 149 Image Sprawl 149 Using Docker to Provision Jenkins Slaves 150 Backing Up Jenkins 150 Hosted CI Solutions 151 Testing and Microservices 151 Testing in Production 153 Conclusion 153 Chapter 9. Deploying Containers 155 Provisioning Resources with Docker Machine 156 Using a Proxy 159 Execution Options 165 Shell Scripts 166 Using a Process Manager (or systemd to Rule Them All) 168 Using a Configuration Management Tool 171 Host Configuration 175 Choosing an OS 175 Choosing a Storage Driver 175 Specialist Hosting Options 178 Triton 178 Google Container Engine 180 Amazon EC2 Container Service 180 Giant Swarm 183 Persistent Data and Production Containers 185 Sharing Secrets 185 Saving Secrets in the Image 185 Passing Secrets in Environment Variables 186 Passing Secrets in Volumes 186 Using a Key-Value Store 187 Networking 188 Production Registry 188 Continuous Deployment/Delivery 189 Conclusion 189 Chapter 10. Logging and Monitoring 191 Logging 192 The Default Docker Logging 192 Aggregating Logs 194 Logging with ELK 194 Docker Logging with syslog 205 Grabbing Logs from File 211 Monitoring and Alerting 212 Monitoring with Docker Tools 212 cAdvisor 214 Cluster Solutions 215 Commercial Monitoring and Logging Solutions 219 Conclusion 219 Part III. Tools and Techniques 221 Chapter 11. Networking and Service Discovery 223 Ambassadors 224 Service Discovery 228 etcd 228 SkyDNS 233 Consul 237 Registration 241 Other Solutions 243 Networking Options 244 Bridge 244 Host 245 Container 246 None 246 New Docker Networking 246 Network Types and Plugins 248 Networking Solutions 248 Overlay 249 Weave 251 Flannel 255 Project Calico 260 Conclusion 264 Chapter 12. Orchestration, Clustering, and Management 267 Clustering and Orchestration Tools 268 Swarm 269 Fleet 275 Kubernetes 281 Mesos and Marathon 289 Container Management Platforms 300 Rancher 300 Clocker 301 Tutum 303 Conclusion 304 Chapter 13. Security and Limiting Containers 307 Things to Worry About 308 Defense-in-Depth 310 Least Privilege 310 Securing Identidock 311 Segregate Containers by Host 313 Applying Updates 314 Avoid Unsupported Drivers 317 Image Provenance 318 Docker Digests 318 Docker Content Trust 319 Reproducible and Trustworthy Dockerfiles 323 Security Tips 325 Set a User 325 Limit Container Networking 327 Remove Setuid/Setgid Binaries 329 Limit Memory 330 Limit CPU 331 Limit Restarts 332 Limit Filesystems 332 Limit Capabilities 333 Apply Resource Limits (ulimits) 334 Run a Hardened Kernel 336 Linux Security Modules 336 SELinux 337 AppArmor 340 Auditing 340 Incident Response 341 Future Features 342 Conclusion 342 Index 345 About the Author 354 Docker containers offer simpler, faster, and more robust methods for developing, distributing, and running software than previously available. With this hands-on guide, you’ll learn __why__ containers are so important, __what__ you’ll gain by adopting Docker, and __how__ to make it part of your development process. Ideal for developers, operations engineers, and system administrators—especially those keen to embrace a DevOps approach—Using Docker will take you from Docker and container basics to running dozens of containers on a multi-host system with networking and scheduling. The core of the book walks you through the steps needed to develop, test, and deploy a web application with Docker. * Get started with Docker by building and deploying a simple web application * Use Continuous Deployment techniques to push your application to production multiple times a day * Learn various options and techniques for logging and monitoring multiple containers * Examine networking and service discovery: how do containers find each other and how do you connect them? * Orchestrate and cluster containers to address load-balancing, scaling, failover, and scheduling * Secure your system by following the principles of defense-in-depth and least privilege
دانلود کتاب Using Docker : Developing and Deploying Software with Containers