Learn Docker in a Month of Lunches

Learn Docker in a Month of Lunches

by Elton Stoneman
Learn Docker in a Month of Lunches

Learn Docker in a Month of Lunches

by Elton Stoneman

eBook

$36.99 

Available on Compatible NOOK devices, the free NOOK App and in My Digital Library.
WANT A NOOK?  Explore Now

Related collections and offers


Overview

Summary

Go from zero to production readiness with Docker in 22 bite-sized lessons! Learn Docker in a Month of Lunches is an accessible task-focused guide to Docker on Linux, Windows, or Mac systems. In it, you’ll learn practical Docker skills to help you tackle the challenges of modern IT, from cloud migration and microservices to handling legacy systems. There’s no excessive theory or niche-use cases—just a quick-and-easy guide to the essentials of Docker you’ll use every day.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the technology

The idea behind Docker is simple: package applica­tions in lightweight virtual containers that can be easily installed. The results of this simple idea are huge! Docker makes it possible to manage applications without creating custom infrastructures. Free, open source, and battle-tested, Docker has quickly become must-know technology for developers and administrators.

About the book

Learn Docker in a Month of Lunches introduces Docker concepts through a series of brief hands-on lessons. Follow­ing a learning path perfected by author Elton Stoneman, you’ll run containers by chapter 2 and package applications by chapter 3. Each lesson teaches a practical skill you can practice on Windows, macOS, and Linux systems. By the end of the month you’ll know how to containerize and run any kind of application with Docker.

What's inside

    Package applications to run in containers
    Put containers into production
    Build optimized Docker images
    Run containerized apps at scale

About the reader

For IT professionals. No previous Docker experience required.

About the author

Elton Stoneman is a consultant, a former architect at Docker, a Microsoft MVP, and a Pluralsight author.

Table of Contents

PART 1 - UNDERSTANDING DOCKER CONTAINERS AND IMAGES

1. Before you begin

2. Understanding Docker and running Hello World

3. Building your own Docker images

4. Packaging applications from source code into Docker Images

5. Sharing images with Docker Hub and other registries

6. Using Docker volumes for persistent storage

PART 2 - RUNNING DISTRIBUTED APPLICATIONS IN CONTAINERS

7. Running multi-container apps with Docker Compose

8. Supporting reliability with health checks and dependency checks

9. Adding observability with containerized monitoring

10. Running multiple environments with Docker Compose

11. Building and testing applications with Docker and Docker Compose

PART 3 - RUNNING AT SCALE WITH A CONTAINER ORCHESTRATOR

12. Understanding orchestration: Docker Swarm and Kubernetes

13. Deploying distributed applications as stacks in Docker Swarm

14. Automating releases with upgrades and rollbacks

15. Configuring Docker for secure remote access and CI/CD

16. Building Docker images that run anywhere: Linux, Windows, Intel, and Arm

PART 4 - GETTING YOUR CONTAINERS READY FOR PRODUCTION

17. Optimizing your Docker images for size, speed, and security

18. Application configuration management in containers

19. Writing and managing application logs with Docker

20. Controlling HTTP traffic to containers with a reverse proxy

21. Asynchronous communication with a message queue

22. Never the end

Product Details

ISBN-13: 9781638350675
Publisher: Manning
Publication date: 06/13/2020
Sold by: SIMON & SCHUSTER
Format: eBook
Pages: 464
File size: 21 MB
Note: This product may take a few minutes to download.

About the Author

Elton Stoneman is a consultant, a former architect at Docker, a Microsoft MVP, and a Pluralsight author.
Elton Stoneman is a 10-time Microsoft MVP and a Docker Captain. After several years working for Docker, Elton now offers consulting services for organizations at every stage in their container journey. He is a regular speaker and workshop instructor at conferences and the author of Learn Docker in a Month of Lunches.

Table of Contents

Preface xvii

Acknowledgments xviii

About this book xix

About the author xxiii

Part 1 Understanding Docker Containers and Images 1

1 Before you begin 3

1.1 Why containers will take over the world 4

Migrating apps to the cloud 4

Modernizing legacy apps 6

Building new cloud-native apps 6

Technical innovation: Serverless and more 8

Digital transformation with DevOps 10

1.2 Is this book for you? 10

1.3 Creating your lab environment 11

Installing Docker 11

Verifying your Docker setup 12

Downloading the source code for the book 13

Remembering the cleanup commands 13

1.4 Being immediately effective 14

2 Understanding Docker and running Hello World 15

2.1 Running Hello World in a container 15

2.2 So what is a container? 18

2.3 Connecting to a container like a remote computer 20

2.4 Hosting a website in a container 23

2.5 Understanding how Docker runs containers 27

2.6 Lab: Exploring the container filesystem 29

3 Building your own Docker images 31

3.1 Using a container image from Docker Hub 31

3.2 Writing your first Dockerfile 35

3.3 Building your own container image 37

3.4 Understanding Docker images and image layers 39

3.5 Optimizing Dockerfiles to use the image layer cache 42

3.6 Lab 44

4 Packaging applications from source code into Docker Images 45

4.1 Who needs a build server when you have a Dockerfile? 45

4.2 App walkthrough: Java source code 49

4.3 App walkthrough; Node.js source code 53

4.4 App walkthrough: Go source code 56

4.5 Understanding multi-stage Dockerfiles 59

4.6 Lab 59

7 Sharing images with Docker Hub and other registries 61

5.1 Working with registries, repositories, and image tags 61

5.2 Pushing your own images to Docker Hub 63

5.3 Running and using your own Docker registry 66

5.4 Using image tags effectively 70

5.5 Turning official images into golden images 72

5.6 Lab 74

6 Using Docker volumes for persistent storage 75

6.1 Why data in containers is not permanent 75

6.2 Running containers with Docker volumes 80

6.3 Running containers with filesystem mounts 85

6.4 Limitations of filesystem mounts 88

6.5 Understanding how the container filesystem is built 92

6.6 Lab 93

Part 2 Running Distributed Applications in Containers 95

7 Running multi-container apps with Docker Compose 97

7.1 The anatomy of a Docker Compose file 97

7.2 Running a multi-container application with Compose 101

7.3 How Docker plugs containers together 107

7.4 Application configuration in Docker Compose 110

7.5 Understanding the problem Docker Compose solves 114

7.6 Lab 116

8 Supporting reliability with health checks and dependency checks 117

8.1 Building health checks into Docker images 117

8.2 Starting containers with dependency checks 123

8.3 Writing custom utilities for application check logic 126

8.4 Defining health checks and dependency checks in Docker Compose 130

8.5 Understanding how checks power self healing apps 134

8.6 Lab 135

9 Adding observability with containerized monitoring 137

9.1 The monitoring stack for containerized applications 137

9.2 Exposing metrics from your application 143

9.3 Running a Prometheus container to collect metrics 147

9.4 Running a Grafana container to visualize metrics 152

9.5 Understanding the levels of observability 159

9.6 Lab 159

10 Running multiple environments with Docker Compose 161

10.1 Deploying many applications with Docker Compose 161

10.2 Using Docker Compose override files 165

10.3 Injecting configuration with environment variables and secrets 172

10.4 Reducing duplication with extension fields 177

10.5 Understanding the configuration workflow with Docker 180

10.6 Lab 181

11 Building and testing applications with Docker and Docker Compose 183

11.1 How the CI process works with Docker 183

11.2 Spinning up build infrastructure with Docker 185

11.3 Capturing build settings with Docker Compose 194

11.4 Writing CI jobs with no dependencies except Docker 198

11.5 Understanding containers in the CI process 202

11.6 Lab 203

Part 3 Running at Scale with a Container Orchestrator 205

12 Understanding orchestration: Docker Swarm and Kubemetes 207

12.1 What is a container orchestrator? 207

12.2 Setting up a Docker Swarm cluster 210

12.3 Running applications as Docker Swarm services 213

12.4 Managing network traffic in the cluster 220

12.5 Understanding the choice between Docker Swarm and Kubernetes 226

12.6 Lab 229

13 Deploying distributed applications as stacks in Docker Swarm 230

13.1 Using Docker Compose for production deployments 231

13.2 Managing app configuration with config objects 235

13.3 Managing confidential settings with secrets 240

13.4 Storing data with volumes in the Swarm 244

13.5 Understanding how the cluster manages stacks 248

13.6 Lab 249

14 Automating releases with upgrades and rollbacks 250

14.1 The application upgrade process with Docker 250

14.2 Configuring production rollouts with Compose 255

14.3 Configuring service rollbacks 259

14.4 Managing downtime for your cluster 264

14.5 Understanding high availability in Swarm clusters 268

14.6 Lab 269

15 Configuring Docker for secure remote access and CI/CD 271

15.1 Endpoint options for the Docker API 272

15.2 Configuring Docker for secure remote access 276

15.3 Using Docker Contexts to work with remote engines 284

15.4 Adding continuous deployment to your CI pipeline 287

15.5 Understanding the access model for Docker 293

15.6 Lab 294

16 Building Docker images that run anywhere: Linux, Windows, Intel, and Arm 295

16.1 Why multi-architecture images are important 295

16.2 Building multi-arch images from one or more Dockerfiles 299

16.3 Pushing multi-arch images to registries with manifests 304

16.4 Building multi-arch images with Docker Buildx 309

16.5 Understanding where multi-arch images fit in your roadmap 314

16.6 Lab 315

Part 1 Getting your Containers Ready for Production 317

17 Optimizing your Docker images for size, speed, and security 319

17.1 Howyou optimize Docker images 319

17.2 Choosing the right base images 324

17.3 Minimizing image layer count and layer size 330

17.4 Taking your multi-stage builds to the next level 333

17.5 Understanding why optimization counts 337

17.6 Lab 337

18 Application configuration management in containers 339

18.1 A multi-tiered approach to app configuration 339

18.2 Packaging config for every environment 343

18.3 Loading configuration from the runtime 347

18.4 Configuring legacy apps in the same way as new apps 351

18.5 Understanding why a flexible configuration model pays off 357

18.6 Lab 358

19 Writing and managing application logs with Docker 359

19.1 Welcome to stderr and stdout! 359

19.2 Relaying logs from other sinks to stdout 364

19.3 Collecting and forwarding container logs 368

19.4 Managing your log output and collection 375

19.5 Understanding the container logging model 379

19.6 Lab 380

20 Controlling HTTP traffic to containers with a reverse proxy 381

20.1 What is a reverse proxy? 381

20.2 Handling routing and SSL in the reverse proxy 387

20.3 Improving performance and reliability with the proxy 392

20.4 Using a cloud-native reverse proxy 396

20.5 Understanding the patterns a reverse proxy enables 403

20.6 Lab 405

21 Asynchronous communication with a message queue 407

21.1 What is asynchronous messaging? 407

21.2 Using a cloud-native message queue 412

21.3 Consuming and handling messages 416

21.4 Adding new features with message handlers 419

21.5 Understanding async messaging patterns 422

21.6 Lab 424

22 Never the end 425

22.1 Run your own proof-of-concept 425

22.2 Make a case for Docker in your organization 426

22.3 Plan the path to production 427

22.4 Meet the Docker community 427

Index 429

From the B&N Reads Blog

Customer Reviews