SlideShare a Scribd company logo
Dan Finneran (@thebsdbox)
EMEA Solutions Architect,
Docker
Docker Storage:
Designing a Platform for
Persistent Data
Why Storage?
Agenda
What does immutable mean for your data
Applications with Persistent Data requirements
Persistent Data with Docker
Docker volume plugins
Orchestrating Storage (Swarm / Kubernetes)
Key Takeaways / Conclusion
Questions
Adjective:
”unchanging over time or unable to
be changed: an immutable fact”
Immutability
• Application + required
libs/assets only
• Designed to be
automated
• Re-Built
ContainerOperating System
• Kernel/Libs/Userland
tools for all uses
• Automation requires
scripts /3rd party
tools
• Patched
Docker Image
FROM alpine (Base image)
COMMIT FE234B (Install binary packages)
COMMIT 234CED (Copy assets or additional code)
Dan's new
Docker Image
V1.0
Docker Container
FROM dan/container:1.0
CoW layer (Copy on Write)
$ docker run --rm dan/container:1.0
/test_file
Docker Container
FROM dan/container:1.0
CoW layer (Copy on Write)
$ docker run --rm dan/container:1.0
Applications with Persistent Data
requirements
• Regardless of the lifespan of the container the data
should always persist.
• The container could be scheduled to run on any
node in the cluster, meaning persistent data may
need to be accessed from any node.
Persistent Data
Accessing Data
Block
File
API
host01
/
mnt
iSCSI / Fibre Channel
NFS
REST
Is it wrong to run a Database in a
container?
Docker storage designing a platform for persistent data
Docker storage designing a platform for persistent data
Latency IOPs
Bandwidth /
Throughput
Security
(external
requirements)
21
34
Databases (+ additional requirements)
Batch processing
Image Processing Format Conversion Transcoding Batch Processing
• Watermark
• Resizing
• Formatting
• Images
• Documents
• Custom data
• Device
handling
• Bandwidth
streaming
• Tasks on
multiple
files/sources
A large number of applications will typically "park" cold
data to a disk under the following circumstances:
• Waiting for a back-end system to respond
• Out of order data being processed
• Data-sets that are typically too large to mapped to
memory
Applications that Require Persistent Data
Between Restarts
Common bad practice patterns
Writing and storing
logs inside a
running container
Push logs to an
external /
centralized
platform
Package large
datasets inside
images
Containers access
datasets through
shared storage
Persistent Data with Docker
•Per container storage
•Shared storage (same host)
•Multi-Host shared storage
Persistence
Implementations
Running your first
Container (*)
*This at least happened to me.
Per container storage
/
var
lib
docker
volumes
$ docker run –it -–rm 
dan/container:1.0 sh
fc4b398edb01
host01
$ # Inside Container
$ mkdir /storage
/
$ touch /storage/dockercon
storage
storage
dockercon
Shared Storage (same host)
/
var
lib
docker
volumes
$ docker volume create dockercon
dockercon
$ docker run –it –-rm –v dockercon:/mnt 
busybox sh
/
mnt
/
mnt
$ docker run –it –-rm –v dockercon:/mnt 
busybox sh
host01
Host Persistence
192.168.0.2
host01
host02
host01 $ docker volume create 
--opt type=nfs 
--opt o=addr=192.168.0.2,rw 
--opt device=:/volume1/docker 
nfs
nfs
nfs
Host Persistence
192.168.0.2
host01
host02
nfs
nfs
/
mnt
host02 $ docker run –it –-rm 
–v nfs:/mnt 
busybox sh
/
mnt
Host Persistence (cleanup)
192.168.0.2
host01
host02
nfs
nfs
/
mnt
/
mnt
Docker Volume Plugins
• Extend the functionality of the Docker Engine
• Use the extensible Docker plugin API
• Allows an end-user to consume existing storage and
its functionality
• Create Docker storage volumes that are linked to a
containers lifecycle (can be persisted afterwards if
needed)
Docker Volume Plugins
Current Plugins
Volume plugin workflow
[dan@dockercon ~]$ docker volume –d array -o ssd -o 32Gb fast_volume
fast_volume
[dan@dockercon ~]$ docker volume ls
DRIVER VOLUME NAME
array fast_volume
[dan@dockercon ~]$ docker plugin install store/storagedriver/array
Volume plugin workflow
host01
API Call
Mount volume/
mnt
$ docker run –it –-rm 
–v dockercon:/mnt 
busybox sh
Data-intensive applications:
Volume plugins expose specialized functionality in storage providers that can be
utilised for data–intensive workloads.
Database migration:
Volume plugins make it easy to move data across hosts in the form of snapshots,
which enable migration of production databases from one host to another with
minimum downtime..
Plugin benefits / use-cases
Stateful application failover:
Ability to have volumes that can be easily moved and re-attached, allowing easy
failover to new machines/instances and re-attaching of data volumes.
Reduced Mean Time Between Failures (MTBF):
With volume plugins connected via a shared storage backend, operations teams
can speed up cluster time-to-recovery by attaching a new database container
to an existing data volume. This results in faster recovery of failed systems.
Plugin benefits / use-cases
Orchestrating Storage with Docker EE 2.0
Storage with Swarm
volumes:
nfs:
driver_opts:
type: "nfs"
o: "addr=docker01,nolock,soft,rw"
device: ":/nfs"
Swarm Volume
As part of the compose file,
specify a named volume and
pass in the required settings
Volume name
Storage with Swarm
dockercon:
image: dockercon:18
volumes:
- type: volume
source: nfs
target: /nfs
volume:
nocopy: true
Service Volumes
In the service definition
reference the volume along
with additional configuration.
Volume name
Mount point
Storage with Kubernetes
Persistent Volume
A persistent volume when applied becomes a
resource that is available to the cluster
Storage with Kubernetes
Persistent Volume Claim
A claim is a request from a user for a persistent
volume, the request can include specifics such
as:
• Volume size
• Volume capabilities
• Access methods
Storage with Kubernetes
Pod
Defines a container or collection of containers
that share networking and volumes.
• Specify a PVC (persistent volume claim)
• Map the PVC to a path inside the POD
/http
Shared storage:
• Smaller images
• Efficient usage of repetitive
data
• Decouples application and
data
Key Takeaways
• Running a Database is fine
in a container, as long as
the requirements are met.
• Don’t write logs inside a
container
Key Takeaways
Questions

More Related Content

What's hot (20)

PDF
Docker Online Meetup: Infrakit update and Q&A
Docker, Inc.
 
PPTX
Dockerizing Windows Server Applications by Ender Barillas and Taylor Brown
Docker, Inc.
 
PPTX
Thinking Inside the Container: A Continuous Delivery Story by Maxfield Stewart
Docker, Inc.
 
PPTX
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
Nati Shalom
 
PDF
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
Brian Grant
 
PDF
Kubernetes 101
Jacopo Nardiello
 
PDF
Troubleshooting Tips from a Docker Support Engineer
Jeff Anderson
 
PDF
Configuration Management and Transforming Legacy Applications in the Enterpri...
Docker, Inc.
 
PDF
DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...
Docker, Inc.
 
PPTX
TIAD 2016 : Migrating 100% of your production services to containers
The Incredible Automation Day
 
PDF
Online Meetup: Why should container system / platform builders care about con...
Docker, Inc.
 
PDF
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
Mario Ishara Fernando
 
PPTX
Programming the world with Docker
Patrick Chanezon
 
PDF
Docker Distributed application bundle & Stack - Overview
Thomas Chacko
 
PDF
Kubernetes and Hybrid Deployments
Sandeep Parikh
 
PPTX
Docker Security workshop slides
Docker, Inc.
 
PDF
Cloning Running Servers with Docker and CRIU by Ross Boucher
Docker, Inc.
 
PPTX
Docker for Fun and Profit
Kel Cecil
 
PDF
Kubernetes automation in production
Paul Bakker
 
PDF
DCEU 18: Tips and Tricks of the Docker Captains
Docker, Inc.
 
Docker Online Meetup: Infrakit update and Q&A
Docker, Inc.
 
Dockerizing Windows Server Applications by Ender Barillas and Taylor Brown
Docker, Inc.
 
Thinking Inside the Container: A Continuous Delivery Story by Maxfield Stewart
Docker, Inc.
 
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
Nati Shalom
 
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
Brian Grant
 
Kubernetes 101
Jacopo Nardiello
 
Troubleshooting Tips from a Docker Support Engineer
Jeff Anderson
 
Configuration Management and Transforming Legacy Applications in the Enterpri...
Docker, Inc.
 
DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...
Docker, Inc.
 
TIAD 2016 : Migrating 100% of your production services to containers
The Incredible Automation Day
 
Online Meetup: Why should container system / platform builders care about con...
Docker, Inc.
 
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
Mario Ishara Fernando
 
Programming the world with Docker
Patrick Chanezon
 
Docker Distributed application bundle & Stack - Overview
Thomas Chacko
 
Kubernetes and Hybrid Deployments
Sandeep Parikh
 
Docker Security workshop slides
Docker, Inc.
 
Cloning Running Servers with Docker and CRIU by Ross Boucher
Docker, Inc.
 
Docker for Fun and Profit
Kel Cecil
 
Kubernetes automation in production
Paul Bakker
 
DCEU 18: Tips and Tricks of the Docker Captains
Docker, Inc.
 

Similar to Docker storage designing a platform for persistent data (20)

PDF
Introduction to Docker storage, volume and image
ejlp12
 
PDF
Persistence patterns for containers
Stephen Watt
 
PPTX
Meetup docker paris
Aliou BA
 
PDF
WP VERITAS InfoScale Storage and Dockers Intro - v8
Rajagopal Vaideeswaran
 
PPTX
Highly Available And Distributed Containers - ContainerCon NA 2016
{code}
 
PPTX
Persistent, Portable Storage for Docker Containers and Microservices
ClusterHQ
 
PPTX
DockerCon EU 2015: Persistent, stateful services with docker cluster, namespa...
Docker, Inc.
 
PPTX
Storage Integrations for Container Orchestrators
{code} by Dell EMC
 
PPTX
State of the Container Ecosystem
Vinay Rao
 
PPTX
Emerging storage-trends-for-containers
kiran mova
 
PDF
Managing Persistent Storage with Docker Containers by John Griffith and Garre...
Docker, Inc.
 
PDF
Persistent storage with containers By Kaslin Fields
Oracle Developers
 
PDF
Kubernetes dealing with storage and persistence
Janakiram MSV
 
PDF
Amsteram Docker meetup - Cloud Native Storage - Chris Brandon
Catalin Jora
 
PDF
Container Attached Storage (CAS) with OpenEBS - Berlin Kubernetes Meetup - Ma...
OpenEBS
 
PDF
Red Hat Storage Day LA - Persistent Storage for Linux Containers
Red_Hat_Storage
 
PPTX
Docker Chennai Meetup - OpenEBS Overview
OpenEBS
 
PDF
DCEU 18: Provisioning and Managing Storage for Docker Containers
Docker, Inc.
 
PDF
Red Hat Storage Day Atlanta - Persistent Storage for Linux Containers
Red_Hat_Storage
 
PPTX
Hedvig & ClusterHQ - Persistent, portable storage for Docker
Eric Carter
 
Introduction to Docker storage, volume and image
ejlp12
 
Persistence patterns for containers
Stephen Watt
 
Meetup docker paris
Aliou BA
 
WP VERITAS InfoScale Storage and Dockers Intro - v8
Rajagopal Vaideeswaran
 
Highly Available And Distributed Containers - ContainerCon NA 2016
{code}
 
Persistent, Portable Storage for Docker Containers and Microservices
ClusterHQ
 
DockerCon EU 2015: Persistent, stateful services with docker cluster, namespa...
Docker, Inc.
 
Storage Integrations for Container Orchestrators
{code} by Dell EMC
 
State of the Container Ecosystem
Vinay Rao
 
Emerging storage-trends-for-containers
kiran mova
 
Managing Persistent Storage with Docker Containers by John Griffith and Garre...
Docker, Inc.
 
Persistent storage with containers By Kaslin Fields
Oracle Developers
 
Kubernetes dealing with storage and persistence
Janakiram MSV
 
Amsteram Docker meetup - Cloud Native Storage - Chris Brandon
Catalin Jora
 
Container Attached Storage (CAS) with OpenEBS - Berlin Kubernetes Meetup - Ma...
OpenEBS
 
Red Hat Storage Day LA - Persistent Storage for Linux Containers
Red_Hat_Storage
 
Docker Chennai Meetup - OpenEBS Overview
OpenEBS
 
DCEU 18: Provisioning and Managing Storage for Docker Containers
Docker, Inc.
 
Red Hat Storage Day Atlanta - Persistent Storage for Linux Containers
Red_Hat_Storage
 
Hedvig & ClusterHQ - Persistent, portable storage for Docker
Eric Carter
 
Ad

More from Docker, Inc. (20)

PDF
Containerize Your Game Server for the Best Multiplayer Experience
Docker, Inc.
 
PDF
How to Improve Your Image Builds Using Advance Docker Build
Docker, Inc.
 
PDF
Build & Deploy Multi-Container Applications to AWS
Docker, Inc.
 
PDF
Securing Your Containerized Applications with NGINX
Docker, Inc.
 
PDF
How To Build and Run Node Apps with Docker and Compose
Docker, Inc.
 
PDF
Hands-on Helm
Docker, Inc.
 
PDF
Distributed Deep Learning with Docker at Salesforce
Docker, Inc.
 
PDF
The First 10M Pulls: Building The Official Curl Image for Docker Hub
Docker, Inc.
 
PDF
Monitoring in a Microservices World
Docker, Inc.
 
PDF
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
Docker, Inc.
 
PDF
Predicting Space Weather with Docker
Docker, Inc.
 
PDF
Become a Docker Power User With Microsoft Visual Studio Code
Docker, Inc.
 
PDF
How to Use Mirroring and Caching to Optimize your Container Registry
Docker, Inc.
 
PDF
Monolithic to Microservices + Docker = SDLC on Steroids!
Docker, Inc.
 
PDF
Kubernetes at Datadog Scale
Docker, Inc.
 
PDF
Labels, Labels, Labels
Docker, Inc.
 
PDF
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
Docker, Inc.
 
PDF
Build & Deploy Multi-Container Applications to AWS
Docker, Inc.
 
PDF
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
Docker, Inc.
 
PDF
Developing with Docker for the Arm Architecture
Docker, Inc.
 
Containerize Your Game Server for the Best Multiplayer Experience
Docker, Inc.
 
How to Improve Your Image Builds Using Advance Docker Build
Docker, Inc.
 
Build & Deploy Multi-Container Applications to AWS
Docker, Inc.
 
Securing Your Containerized Applications with NGINX
Docker, Inc.
 
How To Build and Run Node Apps with Docker and Compose
Docker, Inc.
 
Hands-on Helm
Docker, Inc.
 
Distributed Deep Learning with Docker at Salesforce
Docker, Inc.
 
The First 10M Pulls: Building The Official Curl Image for Docker Hub
Docker, Inc.
 
Monitoring in a Microservices World
Docker, Inc.
 
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
Docker, Inc.
 
Predicting Space Weather with Docker
Docker, Inc.
 
Become a Docker Power User With Microsoft Visual Studio Code
Docker, Inc.
 
How to Use Mirroring and Caching to Optimize your Container Registry
Docker, Inc.
 
Monolithic to Microservices + Docker = SDLC on Steroids!
Docker, Inc.
 
Kubernetes at Datadog Scale
Docker, Inc.
 
Labels, Labels, Labels
Docker, Inc.
 
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
Docker, Inc.
 
Build & Deploy Multi-Container Applications to AWS
Docker, Inc.
 
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
Docker, Inc.
 
Developing with Docker for the Arm Architecture
Docker, Inc.
 
Ad

Recently uploaded (15)

PPTX
Food_and_Drink_Bahasa_Inggris_Kelas_5.pptx
debbystevani36
 
PDF
Generalization predition MOOCs - Conference presentation - eMOOCs 2025
pmmorenom01
 
PPTX
BARRIERS TO EFFECTIVE COMMUNICATION.pptx
shraddham25
 
PDF
The Impact of Game Live Streaming on In-Game Purchases of Chinese Young Game ...
Shibaura Institute of Technology
 
PPTX
STURGEON BAY WI AG PPT JULY 6 2025.pptx
FamilyWorshipCenterD
 
PDF
The Family Secret (essence of loveliness)
Favour Biodun
 
PPTX
2025-07-13 Abraham 07 (shared slides).pptx
Dale Wells
 
PPTX
some leadership theories MBA management.pptx
rkseo19
 
PPTX
AI presentation for everyone in every fields
dodinhkhai1
 
PDF
Leveraging the Power of Jira Dashboard.pdf
siddharthshukla742740
 
PDF
Cloud Computing Service Availability.pdf
chakrirocky1
 
PPTX
Presentationexpressions You are student leader and have just come from a stud...
BENSTARBEATZ
 
PPTX
Inspired by VeinSense: Supercharge Your Hackathon with Agentic AI
ShubhamSharma2528
 
PPTX
Pastor Bob Stewart Acts 21 07 09 2025.pptx
FamilyWorshipCenterD
 
PPTX
presentation on legal and regulatory action
raoharsh4122001
 
Food_and_Drink_Bahasa_Inggris_Kelas_5.pptx
debbystevani36
 
Generalization predition MOOCs - Conference presentation - eMOOCs 2025
pmmorenom01
 
BARRIERS TO EFFECTIVE COMMUNICATION.pptx
shraddham25
 
The Impact of Game Live Streaming on In-Game Purchases of Chinese Young Game ...
Shibaura Institute of Technology
 
STURGEON BAY WI AG PPT JULY 6 2025.pptx
FamilyWorshipCenterD
 
The Family Secret (essence of loveliness)
Favour Biodun
 
2025-07-13 Abraham 07 (shared slides).pptx
Dale Wells
 
some leadership theories MBA management.pptx
rkseo19
 
AI presentation for everyone in every fields
dodinhkhai1
 
Leveraging the Power of Jira Dashboard.pdf
siddharthshukla742740
 
Cloud Computing Service Availability.pdf
chakrirocky1
 
Presentationexpressions You are student leader and have just come from a stud...
BENSTARBEATZ
 
Inspired by VeinSense: Supercharge Your Hackathon with Agentic AI
ShubhamSharma2528
 
Pastor Bob Stewart Acts 21 07 09 2025.pptx
FamilyWorshipCenterD
 
presentation on legal and regulatory action
raoharsh4122001
 

Docker storage designing a platform for persistent data