Book Image

Troubleshooting Docker

By : Vaibhav Kohli, Rajdeep Dua, John Wooten
Book Image

Troubleshooting Docker

By: Vaibhav Kohli, Rajdeep Dua, John Wooten

Overview of this book

You?re pro Docker? You?ve read all about orchestration with Docker in books? Now learn how to troubleshoot Docker in practice. Gain all the tools to safely see Docker in action with this 2017 book.
Table of Contents (17 chapters)
Troubleshooting Docker
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
Free Chapter
1
Understanding Container Scenarios and an Overview of Docker

Chapter 9. Hooking Volume Baggage

This chapter introduces data volumes and storage driver concepts, which are widely used in Docker to manage persistent or shared data. We'll be also taking a deep dive into various storage drivers supported by Docker, and the basic commands associated with them for management. The three main use cases for Docker data volumes are as follows:

  • To keep data persistent after a container is deleted

  • To share data between the host and the Docker container

  • To share data across Docker containers

In order to understand a Docker volume, we need to understand how the Docker filesystem works. Docker images are stored as a series of read-only layers. When the container is started, the read-only image adds a read-write layer on top. If the current file needs to be modified, it is copied from the read-only layer to the read-write layer, where changes are applied. The version of the file in the read-write layer hides the underlying file but doesn't destroy it. Thus, when a Docker...