Fork me on GitHub

Project Notes

#121 Cookbook (Packt)

Book notes - Docker Cookbook, 2nd Edition by Ken Cochrane, Jeeva S. Chelladhurai, Neependra K Khare, published by Packt.

Notes

Table of Contents - Highlights

1 Introduction and Installation

Covers installation on most OS, but details get out of date very quickly.

2 Working with Docker Containers

Covers basic of working with images, containers including:

  • Setting the restart policy on a container
  • Getting privileged access inside a container
  • Accessing the host device inside a container
  • Injecting a new process into a running container
  • Reading a container’s metadata
  • Labeling and filtering containers
  • Reaping a zombie inside a container

3 Working with Docker Images

  • Creating an image from the container
  • Creating an account with Docker Hub
  • Logging in and out of the Docker image registry
  • Publishing an image to the registry
  • Looking at the history of an image
  • Removing an image
  • Exporting an image
  • Importing an image
  • Building an image using a Dockerfile
  • Building an Apache image – a Dockerfile example
  • Setting up a private index/registry
  • Automated builds – with GitHub and Bitbucket
  • Creating a custom base image
  • Creating a minimal image using a scratch base image
  • Building images in multiple stages
  • Visualizing the image hierarchy

4 Network and Data Management for Containers

  • Accessing containers from outside
  • Attaching containers to a host network
  • Launching containers with no network
  • Sharing IP addresses with other containers
  • Creating a user-defined bridge network
  • Discovering and load balancing containers
  • Persisting data using volumes
  • Sharing data between the host and the container
  • 5Docker Use Cases
  • Docker Use Cases
  • Introduction
  • Testing with Docker
  • Performing CI/CD with Shippable and Heroku
  • Performing CI/CD with TravisCI
  • Setting up PaaS with OpenShift origin
  • Building and deploying an app on OpenShift from the source code

6 Docker APIs and SDKs

  • Working with images using APIs
  • Building images using APIs
  • Launching containers using APIs
  • Performing container operations using APIs
  • Exploring Docker remote API client libraries
  • Configuring the Docker daemon for remote connectivity
  • Securing the Docker daemon’s remote connectivity
  • 7Docker Performance
  • Docker Performance
  • Introduction
  • Benchmarking CPU, disk, network performance
  • Getting container resource usage using the stats feature
  • Setting up performance monitoring

8 Docker Orchestration and Hosting a Platform

  • Running applications with Docker Compose
  • Setting up a cluster with Docker Swarm
  • Using secrets with Docker Swarm
  • Setting up a Kubernetes cluster
  • Using secrets with Kubernetes
  • Scaling up and down in Kubernetes cluster
  • Setting up WordPress with Kubernetes clusters

9 Docker Security

  • Setting Mandatory Access Control (MAC) with SELinux
  • Allowing writes to volumes mounted from the host with SELinux ON
  • Removing capabilities to break down the power of a root user inside a container
  • Sharing namespaces between the host and the container

10 Getting Help and Tips and Tricks

  • Starting Docker in debug mode
  • Building a Docker binary from the source
  • Building images without using cached layers
  • Building your own bridge for container communication
  • Changing the default OCI runtime
  • Selecting the logging driver for containers
  • Getting real-time Docker events for containers

11 Docker on the Cloud

  • Docker for AWS
  • Deploying WordPress on Docker for AWS
  • Docker for Azure
  • Deploying Joomla! on Docker for Azure

Getting the Example Source

Available for download from the Packt.

Credits and References

About LCK#121 dockerbook

This page is a web-friendly rendering of my project notes shared in the LittleCodingKata GitHub repository.

Project Source on GitHub Return to the LittleCodingKata Catalog
About LittleCodingKata

LittleCodingKata is my collection of programming exercises, research and code toys broadly spanning things that relate to programming and software development (languages, frameworks and tools).

These range from the trivial to the complex and serious. Many are inspired by existing work and I'll note credits and references where applicable. The focus is quite scattered, as I variously work on things new and important in the moment, or go back to revisit things from the past.

This is primarily a personal collection for my own edification and learning, but anyone who stumbles by is welcome to borrow, steal or reference the work here. And if you spot errors or issues I'd really appreciate some feedback - create an issue, send me an email or even send a pull-request.

Follow the Blog follow projects and notes as they are published in your favourite feed reader