Docker Cookbook

80 hands-on recipes to efficiently work with the Docker 1.6 environment on Linux
Preview in Mapt
Code Files

Docker Cookbook

Neependra Khare

1 customer reviews
80 hands-on recipes to efficiently work with the Docker 1.6 environment on Linux
Mapt Subscription
FREE
$29.99/m after trial
eBook
$25.20
RRP $35.99
Save 29%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$25.20
$44.99
$29.99 p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Docker Cookbook Book Cover
Docker Cookbook
$ 35.99
$ 25.20
Docker Cookbook - Second Edition Book Cover
Docker Cookbook - Second Edition
$ 35.99
$ 25.20
Buy 2 for $35.00
Save $36.98
Add to Cart

Book Details

ISBN 139781783984862
Paperback248 pages

Book Description

Docker is a Linux container engine that allows you to create consistent, stable, and production-quality environments with containers.

You will start by installing Docker and understanding and working with containers and images. You then proceed to learn about network and data management for containers. The book explores the RESTful APIs provided by Docker to perform different actions such as image/container operations. Finally, the book explores logs and troubleshooting Docker to solve issues and bottlenecks. This book will also help you understand Docker use cases, orchestration, security, ecosystems, and hosting platforms to make your applications easy to deploy, build, and collaborate on.

Table of Contents

Chapter 1: Introduction and Installation
Introduction
Verifying the requirements for Docker installation
Installing Docker
Pulling an image and running a container
Adding a nonroot user to administer Docker
Setting up the Docker host with Docker Machine
Finding help with the Docker command line
Chapter 2: Working with Docker Containers
Introduction
Listing/searching for an image
Pulling an image
Listing images
Starting a container
Listing containers
Looking at the logs of containers
Stopping a container
Deleting a container
Setting the restart policy on a container
Getting privileged access inside a container
Exposing a port while starting a container
Accessing the host device inside the container
Injecting a new process to a running container
Returning low-level information about a container
Labeling and filtering containers
Chapter 3: Working with Docker Images
Introduction
Creating an account with Docker Hub
Creating an image from the container
Publishing an image to the registry
Looking at the history of an image
Deleting an image
Exporting an image
Importing an image
Building images using Dockerfiles
Building an Apache image – a Dockerfile example
Accessing Firefox from a container – a Dockerfile example
Building a WordPress image – a Dockerfile example
Setting up a private index/registry
Automated builds – with GitHub and Bitbucket
Creating the base image – using supermin
Creating the base image – using Debootstrap
Visualizing dependencies between layers
Chapter 4: Network and Data Management for Containers
Introduction
Accessing containers from outside
Managing data in containers
Linking two or more containers
Developing a LAMP application by linking containers
Networking of multihost containers with Flannel
Assigning IPv6 addresses to containers
Chapter 5: Docker Use Cases
Introduction
Testing with Docker
Doing CI/CD with Shippable and Red Hat OpenShift
Doing CI/CD with Drone
Setting up PaaS with OpenShift Origin
Building and deploying an app on OpenShift v3 from the source code
Configuring Docker as a hypervisor driver for OpenStack
Chapter 6: Docker APIs and Language Bindings
Introduction
Configuring the Docker daemon remote API
Performing image operations using remote APIs
Performing container operations using remote APIs
Exploring Docker remote API client libraries
Securing the Docker daemon remote API
Chapter 7: Docker Performance
Introduction
Benchmarking CPU performance
Benchmarking disk performance
Benchmarking network performance
Getting container resource usage using the stats feature
Setting up performance monitoring
Chapter 8: Docker Orchestration and Hosting Platforms
Introduction
Running applications with Docker Compose
Setting up cluster with Docker Swarm
Setting up CoreOS for Docker orchestration
Setting up a Project Atomic host
Doing atomic update/rollback with Project Atomic
Adding more storage for Docker in Project Atomic
Setting up Cockpit for Project Atomic
Setting up a Kubernetes cluster
Scaling up and down in a Kubernetes cluster
Setting up WordPress with a Kubernetes cluster
Chapter 9: Docker Security
Introduction
Setting Mandatory Access Control (MAC) with SELinux
Allowing writes to volume mounted from the host with SELinux ON
Removing capabilities to breakdown the power of a root user inside a container
Sharing namespaces between the host and the container
Chapter 10: Getting Help and Tips and Tricks
Introduction
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 execution driver of Docker
Selecting the logging driver for containers
Getting real-time Docker events for containers

What You Will Learn

  • Install and set up Docker on different environments
  • Work with Docker images and containers to Dockerize applications
  • Create services with Docker to enable the swift development and deployment of applications
  • Make optimum use of Docker in a testing environment do complete CI/CD
  • Plan efficient working with Docker APIs, orchestration, and hosting platform such as Project Atomic
  • Learn the various use cases available for Docker
  • Troubleshoot, maintain, and optimize your Docker services effectively

Authors

Table of Contents

Chapter 1: Introduction and Installation
Introduction
Verifying the requirements for Docker installation
Installing Docker
Pulling an image and running a container
Adding a nonroot user to administer Docker
Setting up the Docker host with Docker Machine
Finding help with the Docker command line
Chapter 2: Working with Docker Containers
Introduction
Listing/searching for an image
Pulling an image
Listing images
Starting a container
Listing containers
Looking at the logs of containers
Stopping a container
Deleting a container
Setting the restart policy on a container
Getting privileged access inside a container
Exposing a port while starting a container
Accessing the host device inside the container
Injecting a new process to a running container
Returning low-level information about a container
Labeling and filtering containers
Chapter 3: Working with Docker Images
Introduction
Creating an account with Docker Hub
Creating an image from the container
Publishing an image to the registry
Looking at the history of an image
Deleting an image
Exporting an image
Importing an image
Building images using Dockerfiles
Building an Apache image – a Dockerfile example
Accessing Firefox from a container – a Dockerfile example
Building a WordPress image – a Dockerfile example
Setting up a private index/registry
Automated builds – with GitHub and Bitbucket
Creating the base image – using supermin
Creating the base image – using Debootstrap
Visualizing dependencies between layers
Chapter 4: Network and Data Management for Containers
Introduction
Accessing containers from outside
Managing data in containers
Linking two or more containers
Developing a LAMP application by linking containers
Networking of multihost containers with Flannel
Assigning IPv6 addresses to containers
Chapter 5: Docker Use Cases
Introduction
Testing with Docker
Doing CI/CD with Shippable and Red Hat OpenShift
Doing CI/CD with Drone
Setting up PaaS with OpenShift Origin
Building and deploying an app on OpenShift v3 from the source code
Configuring Docker as a hypervisor driver for OpenStack
Chapter 6: Docker APIs and Language Bindings
Introduction
Configuring the Docker daemon remote API
Performing image operations using remote APIs
Performing container operations using remote APIs
Exploring Docker remote API client libraries
Securing the Docker daemon remote API
Chapter 7: Docker Performance
Introduction
Benchmarking CPU performance
Benchmarking disk performance
Benchmarking network performance
Getting container resource usage using the stats feature
Setting up performance monitoring
Chapter 8: Docker Orchestration and Hosting Platforms
Introduction
Running applications with Docker Compose
Setting up cluster with Docker Swarm
Setting up CoreOS for Docker orchestration
Setting up a Project Atomic host
Doing atomic update/rollback with Project Atomic
Adding more storage for Docker in Project Atomic
Setting up Cockpit for Project Atomic
Setting up a Kubernetes cluster
Scaling up and down in a Kubernetes cluster
Setting up WordPress with a Kubernetes cluster
Chapter 9: Docker Security
Introduction
Setting Mandatory Access Control (MAC) with SELinux
Allowing writes to volume mounted from the host with SELinux ON
Removing capabilities to breakdown the power of a root user inside a container
Sharing namespaces between the host and the container
Chapter 10: Getting Help and Tips and Tricks
Introduction
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 execution driver of Docker
Selecting the logging driver for containers
Getting real-time Docker events for containers

Book Details

ISBN 139781783984862
Paperback248 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Mastering Docker Book Cover
Mastering Docker
$ 39.99
$ 28.00
Developing with Docker Book Cover
Developing with Docker
$ 35.99
$ 25.20
Learning Docker Book Cover
Learning Docker
$ 39.99
$ 8.00
Docker Networking Cookbook Book Cover
Docker Networking Cookbook
$ 39.99
$ 28.00
Docker: Creating Structured Containers Book Cover
Docker: Creating Structured Containers
$ 59.99
$ 42.00
DevOps Automation Cookbook Book Cover
DevOps Automation Cookbook
$ 35.99
$ 25.20