Docker Deep Dive by Nigel poulton

0
2512

Features

  • All in one package from learning to certification
  • Book has been written according to two perspective
    • Nontechnical (Big picture stuff)
    • Technical stuff for technical people
  • Installing docker
  • Explain each feature
    • Docker engine
    • TLDR
    • Image
    • Containerizing
    • Network and security of the container
    • Enterprise edition
  • DCA (Docker certified associate

A book by Nigel Poulton Deep docker dive

Description

This is a book about Docker. No prior knowledge is required! The motto of the book is Zero to Docker in one book! If you are interested in Docker and want to know how it works and how to do things correctly, this book is dedicated to you! If you can not use Docker, and I have not worried about your mistakes, this book is not for you.

What’s this Docker Certified Associate stuff

Docker released its first professional certification in the fall of 2017. It’s called the Docker Certified Associate (DCA) and it’s for people wanting to prove their mastery of Docker.
The exam objectives match a lot of real-world scenarios, so I decided to update the book so that it covered all objectives. In doing this, I worked extremely hard to keep the book interesting and applicable in the real world. Thisisnotanexam-crambook.Yes,itcoversallexamtopics,butthisisareal-world book that is enjoyable to read. Atthetimeofpublishing,thisistheonlyresourceavailablethatcoverstheentire set of DCA exam objectives! Good luck with your exam!

Is not Docker just for developers?

If you think Docker is only for developers, get ready for your world to go crazy! Containerized applications need a place to run and someone to manage them. If you think the developers are going to do that, you’re dreaming. The operations will need to build and execute high-performance Docker infrastructures for production. If you have a UPS approach and do not have experience in Docker, a great pain awaits you. But do not stress, the book will help you!

Author : Nigel Poulton

Hi, and welcome to Pluralsight. So I’m Nigel, and I am containerized software running on top of top-spec biological hardware. Yeah, that’s me. I’m all over containers and Docker and stuff like that. So I create awesome Docker and container courses here at Pluralsight, and I do work with a team over at Docker, Inc. as well. And you know what, to cut a long story short, I pretty much live and breathe containers. Anyway, Docker and containers are hot. I mean, it’s rare that I’ll have a technical conversation these days without somebody asking me about containers. And more and more, those people are actually using them. Yeah, most people have them in a lab somewhere, but increasingly, people are rolling out business-critical production apps that are based on containers. And when we’re talking line of business apps in production, we really want to get this stuff right, yeah? So with that in mind, I am really excited to be bringing you this Docker Deep Dive course, a course that I honestly designed to be able to take you from, and I know this sounds cheesy, but from zero to hero. You really can start from the most basic level of IT experience, and by the end of the course, you will have Docker knowledge coursing through your veins. We cover the theory and the hands-on, starting with the basics and building up a solid knowledge. So good luck with the course, and live long and prosper in the coming world of containers.

Table of content:

0: About the book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
What’s this Docker Certified Associate stuff? . . . . . . . . . . . . . . . 1
What about a print (paperback) version . . . . . . . . . . . . . . . . . . 2
Why should I read this book or care about Docker? . . . . . . . . . . . . 3
Isn’t Docker just for developers? . . . . . . . . . . . . . . . . . . . . . . 3
Should I buy the book if I’ve already watched your video training courses? 3
How the book is organized . . . . . . . . . . . . . . . . . . . . . . . . . 4
Versions of the book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Having problems getting the latest updates on your Kindle? . . . . . . . 6


Part 1: The big picture stuff . . . . . . . . . . . . . . 7
1: Containers from 30,000 feet . . . . . . . . . . . . . . . . . . . . . . . . . 8
The bad old days . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Hello VMware! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
VMwarts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Hello Containers! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Linux containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Hello Docker! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Windows containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Windows containers vs Linux containers . . . . . . . . . . . . . . . . . . 11
What about Mac containers? . . . . . . . . . . . . . . . . . . . . . . . . 11
What about Kubernetes . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2: Docker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Docker – The TLDR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Docker, Inc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
The Docker runtime and orchestration engine . . . . . . . . . . . . . . . 16
The Docker open-source project (Moby) . . . . . . . . . . . . . . . . . . 17
The container ecosystem . . . . . . . . . . . . . . . . . . . . . . . . . . 18
The Open Container Initiative (OCI) . . . . . . . . . . . . . . . . . . . . 19
Chapter summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3: Installing Docker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Docker for Windows (DfW) . . . . . . . . . . . . . . . . . . . . . . . . . 22
Docker for Mac (DfM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Installing Docker on Linux . . . . . . . . . . . . . . . . . . . . . . . . . 32
Installing Docker on Windows Server 2016 . . . . . . . . . . . . . . . . . 35
Upgrading the Docker Engine . . . . . . . . . . . . . . . . . . . . . . . . 37
Docker and storage drivers . . . . . . . . . . . . . . . . . . . . . . . . . 40
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4: The big picture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
The Ops Perspective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
The Dev Perspective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

Part 2: The technical stuff . . . . . . . . . . . . . . . . 62
5: The Docker Engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Docker Engine – The TLDR . . . . . . . . . . . . . . . . . . . . . . . . . 63
Docker Engine – The Deep Dive . . . . . . . . . . . . . . . . . . . . . . 64
Chapter summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
6: Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Docker images – The TLDR . . . . . . . . . . . . . . . . . . . . . . . . . 74
Docker images – The deep dive . . . . . . . . . . . . . . . . . . . . . . . 75
Images – The commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Chapter summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

7: Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Docker containers – The TLDR . . . . . . . . . . . . . . . . . . . . . . . 104
Docker containers – The deep dive . . . . . . . . . . . . . . . . . . . . . 106
Containers – The commands . . . . . . . . . . . . . . . . . . . . . . . . 127
Chapter summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

8: Containerizing an app . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Containerizing an app – The TLDR . . . . . . . . . . . . . . . . . . . . . 130 Containerizing an app – The deep dive . . . . . . . . . . . . . . . . . . . 131 Containerizing an app – The commands . . . . . . . . . . . . . . . . . . 153
Chapter summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
9: Deploying Apps with Docker Compose . . . . . . . . . . . . . . . . . . 155
Deploying apps with Compose – The TLDR . . . . . . . . . . . . . . . . 155
Deploying apps with Compose – The Deep Dive . . . . . . . . . . . . . . 156
Deploying apps with Compose – The commands . . . . . . . . . . . . . . 176
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177

10: Docker Swarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Docker Swarm – The TLDR . . . . . . . . . . . . . . . . . . . . . . . . . 178
Docker Swarm – The Deep Dive . . . . . . . . . . . . . . . . . . . . . . 179
Docker Swarm – The Commands . . . . . . . . . . . . . . . . . . . . . . 204 Chapter summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
11: Docker Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Docker Networking – The TLDR . . . . . . . . . . . . . . . . . . . . . . 206
Docker Networking – The Deep Dive . . . . . . . . . . . . . . . . . . . . 207
Docker Networking – The Commands . . . . . . . . . . . . . . . . . . . 234
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
12: Docker overlay networking . . . . . . . . . . . . . . . . . . . . . . . . 236
Docker overlay networking – The TLDR . . . . . . . . . . . . . . . . . . 236
Docker overlay networking – The deep dive . . . . . . . . . . . . . . . . 237
Docker overlay networking – The commands . . . . . . . . . . . . . . . 252
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253

13: Volumes and persistent data . . . . . . . . . . . . . . . . . . . . . . . . 254
Volumes and persistent data – The TLDR . . . . . . . . . . . . . . . . . . 254
Volumes and persistent data – The Deep Dive . . . . . . . . . . . . . . . 255
Volumes and persistent data – The Commands . . . . . . . . . . . . . . . 265
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
14: Deploying apps with Docker Stacks . . . . . . . . . . . . . . . . . . . . 267
Deploying apps with Docker Stacks – The TLDR . . . . . . . . . . . . . . 267 Deploying apps with Docker Stacks – The Deep Dive . . . . . . . . . . . 268 Deploying apps with Docker Stacks – The Commands . . . . . . . . . . . 292 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
15: Security in Docker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Security in Docker – The TLDR . . . . . . . . . . . . . . . . . . . . . . . 294
Security in Docker – The deep dive . . . . . . . . . . . . . . . . . . . . . 296
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
16: Tools for the enterprise . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Tools for the enterprise – The TLDR . . . . . . . . . . . . . . . . . . . . 322
Tools for the enterprise – The Deep Dive . . . . . . . . . . . . . . . . . . 323
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
17: Enterprise-grade features . . . . . . . . . . . . . . . . . . . . . . . . . . 355
Enterprise-grade features – The TLDR . . . . . . . . . . . . . . . . . . . 355
Enterprise-grade features – The Deep Dive . . . . . . . . . . . . . . . . . 355
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
Appendix A: Securing client and daemon communication . . . . . . . . . 386
Lab setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
Create a CA (self-signed certs) . . . . . . . . . . . . . . . . . . . . . . . 389
Configure Docker for TLS . . . . . . . . . . . . . . . . . . . . . . . . . . 394
Docker TLS Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
Appendix B: The DCA Exam . . . . . . . . . . . . . . . . . . . . . . . . . . 401
Other resources to help with the exam . . . . . . . . . . . . . . . . . . . 401
Mapping exam objectives to chapters . . . . . . . . . . . . . . . . . . . . 403
CONTENTS
Domain 1: Orchestration (25% of exam) . . . . . . . . . . . . . . . . . . 403
Domain 2: Image Creation, Management, and Registry (20% of exam) . . 404
Domain 3: Installation and Configuration (15% of exam) . . . . . . . . . 405
Domain 4: Networking (15% of exam) . . . . . . . . . . . . . . . . . . . 405
Domain 5: Security (15% of exam) . . . . . . . . . . . . . . . . . . . . . 406
Domain 6: Storage and Volumes (10% of exam) . . . . . . . . . . . . . . 406
Appendix C: What next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
Video training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
Certifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
Community events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409

Taimour

LEAVE A REPLY

Please enter your comment!
Please enter your name here