This book starts with setting up Docker in different environment, and helps you learn how to work with Docker images. Then, you will take a deep dive into network and data management for containers. The book explores the RESTful APIs provided by Docker to perform different actions, such as image/container operations. The book then explores logs and troubleshooting Docker to solve issues and bottlenecks. You will gain an understanding of Docker use cases, orchestration, security, ecosystems, and hosting platforms to make your applications easy to deploy, build, and collaborate on. The book covers the new features of Docker 18.xx (or later), such as working with AWS and Azure, Docker Engine, Docker Swarm, Docker Compose, and so on.
Author(s): Ken Cochrane, Jeeva S. Chelladhurai, Neependra K Khare
Publisher: Packt Publishing
Year: 2018
Language: English
Pages: 344
Tags: Containers, Virtualization, Docker
Cover
......Page 1
Title Page......Page 2
Copyright and Credits......Page 3
Dedication......Page 4
Packt Upsell......Page 5
Contributors......Page 6
Table of Contents......Page 9
Preface......Page 22
Chapter 1: Introduction and Installation......Page 28
Introduction......Page 29
The PID namespace......Page 32
The net namespace......Page 33
The IPC namespace......Page 34
Cgroups......Page 35
The container format......Page 38
How to do it…......Page 39
See also......Page 40
How to do it…......Page 41
How it works.........Page 42
Getting ready......Page 43
How to do it.........Page 44
There's more.........Page 45
Getting ready......Page 46
Installing Docker for Windows......Page 47
How to do it......Page 48
There's more......Page 49
See also......Page 50
How to do it......Page 51
There's more.........Page 53
Pulling an image and running a container......Page 54
How to do it.........Page 55
How it works…......Page 56
There's more…......Page 57
How to do it.........Page 58
See also......Page 59
Chapter 2: Working with Docker Containers......Page 60
Listing/searching for an image......Page 61
How to do it.........Page 62
See also......Page 63
How it works.........Page 64
See also......Page 65
How it works.........Page 66
How to do it.........Page 67
How it works.........Page 68
There's more.........Page 69
Getting ready......Page 70
There's more.........Page 71
How to do it.........Page 72
See also......Page 73
There's more.........Page 74
How to do it.........Page 75
See also......Page 76
How to do it.........Page 77
Getting ready......Page 78
See also......Page 79
How to do it.........Page 80
Accessing the host device inside a container......Page 81
Injecting a new process into a running container......Page 82
See also......Page 83
How to do it.........Page 84
Labeling and filtering containers......Page 85
How to do it.........Page 86
There's more.........Page 87
Reaping a zombie inside a container......Page 88
There's more.........Page 89
See also......Page 90
Chapter 3: Working with Docker Images......Page 91
Getting ready......Page 92
How to do it.........Page 93
There's more.........Page 94
Getting ready......Page 95
How to do it.........Page 96
See also......Page 98
How to do it.........Page 99
See also......Page 101
How to do it.........Page 102
How it works.........Page 103
Getting ready......Page 104
There's more.........Page 105
Getting ready......Page 106
How to do it.........Page 107
There's more.........Page 108
How to do it.........Page 109
Getting ready......Page 110
Building an image using a Dockerfile......Page 111
How to do it.........Page 112
How it works.........Page 113
There's more.........Page 114
Building an Apache image – a Dockerfile example......Page 117
How to do it.........Page 118
There's more.........Page 119
How to do it.........Page 120
See also......Page 121
How to do it.........Page 122
There's more.........Page 132
How to do it.........Page 133
Creating a minimal image using a scratch base image......Page 134
How to do it.........Page 135
How it works.........Page 136
Building images in multiple stages......Page 137
How to do it.........Page 138
How it works.........Page 139
Getting ready......Page 140
How to do it.........Page 141
See also......Page 142
Introduction......Page 143
Accessing containers from outside......Page 147
How to do it.........Page 148
How it works.........Page 149
See also......Page 150
How to do it.........Page 151
See also......Page 152
How to do it.........Page 153
Sharing IP addresses with other containers......Page 154
How to do it.........Page 155
How it works.........Page 156
See also......Page 157
Getting ready......Page 158
How to do it.........Page 159
See also......Page 161
How to do it.........Page 162
How it works.........Page 164
See also......Page 165
Persisting data using volumes......Page 166
How to do it.........Page 167
How it works.........Page 168
See also......Page 169
How to do it.........Page 170
There's more.........Page 171
See also......Page 172
Introduction......Page 173
Testing with Docker......Page 174
Getting ready......Page 175
How to do it…......Page 176
Performing CI/CD with Shippable and Heroku......Page 177
Getting ready......Page 178
How to do it…......Page 181
How it works…......Page 184
Performing CI/CD with TravisCI......Page 185
Getting ready......Page 186
How to do it…......Page 187
Setting up PaaS with OpenShift origin......Page 189
Getting ready......Page 191
How to do it…......Page 192
Building and deploying an app on OpenShift from the source code......Page 202
How to do it…......Page 204
How it works…......Page 205
See also......Page 206
Introduction......Page 207
How to do it.........Page 210
How it works.........Page 212
See also......Page 213
How to do it.........Page 214
There's more.........Page 215
Launching containers using APIs......Page 217
How to do it.........Page 218
How it works.........Page 219
Performing container operations using APIs......Page 220
How to do it.........Page 221
Exploring Docker remote API client libraries......Page 222
How to do it.........Page 223
How to do it.........Page 225
See also......Page 228
How to do it.........Page 229
There's more.........Page 233
See also......Page 234
Introduction......Page 235
Benchmarking CPU performance......Page 240
How to do it…......Page 241
See also......Page 243
Getting ready......Page 244
How to do it.........Page 245
Benchmarking network performance......Page 247
How to do it…......Page 248
How it works…......Page 249
How to do it.........Page 250
Getting ready......Page 251
How to do it.........Page 252
See also......Page 253
Introduction......Page 254
How to do it......Page 255
There's more.........Page 256
See also......Page 257
Getting ready......Page 258
How to do it......Page 259
How it works…......Page 260
Using secrets with Docker Swarm......Page 261
How to do it.........Page 262
See also......Page 263
Setting up a Kubernetes cluster......Page 264
Getting ready......Page 265
There's more.........Page 267
Using secrets with Kubernetes......Page 269
How to do it.........Page 270
How it works.........Page 271
See also......Page 272
How to do it.........Page 273
There's more.........Page 274
How to do it.........Page 275
See also......Page 277
Introduction......Page 278
Setting Mandatory Access Control (MAC) with SELinux......Page 282
How to do it…......Page 283
There's more.........Page 285
How to do it.........Page 286
Removing capabilities to break down the power of a root user inside a container......Page 287
Getting ready......Page 288
There's more.........Page 289
Getting ready......Page 290
How to do it.........Page 291
How it works.........Page 292
Introduction......Page 293
How to do it.........Page 294
Building a Docker binary from the source......Page 295
How to do it.........Page 296
Getting ready......Page 297
How to do it.........Page 298
How to do it.........Page 299
How it works.........Page 300
Getting ready......Page 301
How it works.........Page 302
Getting ready......Page 303
See also......Page 304
How to do it.........Page 305
There's more.........Page 306
See also......Page 307
Introduction......Page 308
Getting ready......Page 309
How to do it.........Page 310
How it works.........Page 314
There's more......Page 315
How to do it.........Page 318
How it works.........Page 322
Docker for Azure......Page 323
Getting ready......Page 324
How to do it.........Page 325
There's more.........Page 330
Getting ready......Page 332
How to do it.........Page 333
See also......Page 337
Other Books You May Enjoy......Page 338
Index......Page 341