Book Image

Docker Cookbook - Second Edition

By : Ken Cochrane, Jeeva S. Chelladhurai, Neependra K Khare
2 (1)
Book Image

Docker Cookbook - Second Edition

2 (1)
By: Ken Cochrane, Jeeva S. Chelladhurai, Neependra K Khare

Overview of this book

Docker is an open source tool used for creating, deploying, and running applications using containers. With more than 100 self-contained tutorials, this book examines common pain points and best practices for developers building distributed applications with Docker. Each recipe in this book addresses a specific problem and offers a proven, best practice solution with insights into how it works, so that you can modify the code and configuration files to suit your needs. The Docker Cookbook begins by guiding you in setting up Docker in different environments and explains how to work with its containers and images. You’ll understand Docker orchestration, networking, security, and hosting platforms for effective collaboration and efficient deployment. The book also covers tips and tricks and new Docker features that support a range of other cloud offerings. By the end of this book, you’ll be able to package and deploy end-to-end distributed applications with Docker and be well-versed with best practice solutions for common development problems.
Table of Contents (13 chapters)

What this book covers

Chapter 1, Introduction and Installation, compares containers with bare metal and virtual machines. It helps you understand Linux kernel features, that enable containerization; finally, we'll take a look at installation recipes.

Chapter 2, Working with Docker Containers, explains the different operations you can perform with containers, such as starting, stopping, listing, and deleting.

Chapter 3, Working with Docker Images, introduces you to Docker Hub and shows you how to share images through Docker Hub and how to host your own Docker registry. It will also show you the different ways to build your own image, along with a few Docker image housekeeping operations.

Chapter 4, Network and Data Management for Containers teaches you how to access the container from the outside world, share external storage within the container, communicate with containers running on other hosts, and more.

Chapter 5, Docker Use Cases, explains most of the Docker use cases, such as using Docker for testing, CI/CD, and setting up a PaaS.

Chapter 6, Docker APIs and Language Bindings, dives deep into the Docker API and shows how to work with Docker using the RESTful API and SDK. The curl command that ships with Ubuntu 18.04 has a bug; so, for this chapter, we are using Ubuntu 16.04 and Docker version 17.03.

Chapter 7, Docker Performance, explains the approach one can follow to compare the performance of containers with bare metal and VMs. It also covers monitoring tools.

Chapter 8, Docker Orchestration and Hosting Platforms, provides an introduction to Docker Compose and Swarm, and then we take a look at using Kubernetes for Docker Orchestration.

Chapter 9, Docker Security, explains general security guidelines, SELinux for mandatory access controls, and other security features such as changing capabilities and sharing namespaces.

Chapter 10, Getting Help and Tips and Tricks, provides tips and tricks and resources to help you in things related to Docker administration and development.

Chapter 11, Docker on Cloud, provides an introduction to Docker for AWS and Azure, along with how to install and deploy an application.