© Deepak Vohra 2017

Deepak Vohra, Docker Management Design Patterns, https://doi.org/10.1007/978-1-4842-2973-6_6

6. Using Mounts

Deepak Vohra

(1)White Rock, British Columbia, Canada

A service task container in a Swarm has access to the filesystem inherited from its Docker image. The data is made integral to a Docker container via its Docker image. At times, a Docker container may need to store or access data on a persistent filesystem. While a container has a filesystem, it is removed once the container exits. In order to store data across container restarts, that data must be persisted somewhere outside the container.

The Problem

Data stored only within a container could result in the following issues:

  • The data is not persistent. The data is removed ...

Get Docker Management Design Patterns: Swarm Mode on Amazon Web Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.