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
host0
1/
mnt
NFS
Is it wrong to run a Database in a
container?
DockerCon 18 docker storage
DockerCon 18 docker storage
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
host0
1
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
host0
1
host02
nfs
nfs
/
mnt
host02 $ docker run –it –-rm 
–v nfs:/mnt 
busybox sh
/
mnt
Host Persistence (cleanup)
192.168.0.2
host0
1
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 Overview
Rohit Jnagal
 
PDF
Docker volume-isolator-in-mesos
Guangya Liu
 
PDF
Introduction to Docker
Jian Wu
 
PPTX
Best Practices for Running Kafka on Docker Containers
BlueData, Inc.
 
PDF
Introduction to Docker & CoreOS - Symfony User Group Cologne
D
 
PDF
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
Stefan Schimanski
 
PPTX
virtualization-vs-containerization-paas
rajdeep
 
PPTX
Docker
Mutlu Okuducu
 
PPTX
Global Operations with Docker Enterprise
Nicola Kabar
 
PPTX
Kubernetes introduction
Dongwon Kim
 
PDF
Introduction to docker
Hiroki Endo
 
PDF
Docker and Kubernetes 101 workshop
Sathish VJ
 
PPTX
Kubernetes Introduction & Whats new in Kubernetes 1.6
Opcito Technologies
 
PDF
Introduction to Docker storage, volume and image
ejlp12
 
PDF
Docker internals
Rohit Jnagal
 
PDF
Nebulaworks Docker Overview 09-22-2015
Chris Ciborowski
 
PDF
Automation and Collaboration Across Multiple Swarms Using Docker Cloud - Marc...
Docker, Inc.
 
PDF
Kubernetes Node Deep Dive
Lei (Harry) Zhang
 
PPTX
Docker Support
HPCC Systems
 
PDF
Docker Meetup: Docker Networking 1.11, by Madhu Venugopal
Michelle Antebi
 
Docker Overview
Rohit Jnagal
 
Docker volume-isolator-in-mesos
Guangya Liu
 
Introduction to Docker
Jian Wu
 
Best Practices for Running Kafka on Docker Containers
BlueData, Inc.
 
Introduction to Docker & CoreOS - Symfony User Group Cologne
D
 
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
Stefan Schimanski
 
virtualization-vs-containerization-paas
rajdeep
 
Global Operations with Docker Enterprise
Nicola Kabar
 
Kubernetes introduction
Dongwon Kim
 
Introduction to docker
Hiroki Endo
 
Docker and Kubernetes 101 workshop
Sathish VJ
 
Kubernetes Introduction & Whats new in Kubernetes 1.6
Opcito Technologies
 
Introduction to Docker storage, volume and image
ejlp12
 
Docker internals
Rohit Jnagal
 
Nebulaworks Docker Overview 09-22-2015
Chris Ciborowski
 
Automation and Collaboration Across Multiple Swarms Using Docker Cloud - Marc...
Docker, Inc.
 
Kubernetes Node Deep Dive
Lei (Harry) Zhang
 
Docker Support
HPCC Systems
 
Docker Meetup: Docker Networking 1.11, by Madhu Venugopal
Michelle Antebi
 

Similar to DockerCon 18 docker storage (20)

PDF
DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...
Docker, Inc.
 
PDF
Persistence patterns for containers
Stephen Watt
 
PDF
WP VERITAS InfoScale Storage and Dockers Intro - v8
Rajagopal Vaideeswaran
 
PPTX
Meetup docker paris
Aliou BA
 
PPTX
Highly Available And Distributed Containers - ContainerCon NA 2016
{code}
 
PPTX
State of the Container Ecosystem
Vinay Rao
 
PPTX
DockerCon EU 2015: Persistent, stateful services with docker cluster, namespa...
Docker, Inc.
 
PPTX
Persistent, Portable Storage for Docker Containers and Microservices
ClusterHQ
 
PDF
Managing Persistent Storage with Docker Containers by John Griffith and Garre...
Docker, Inc.
 
PPTX
Emerging storage-trends-for-containers
kiran mova
 
PDF
Kubernetes dealing with storage and persistence
Janakiram MSV
 
PPTX
Storage Integrations for Container Orchestrators
{code} by Dell EMC
 
PDF
Persistent storage with containers By Kaslin Fields
Oracle Developers
 
PDF
Amsteram Docker meetup - Cloud Native Storage - Chris Brandon
Catalin Jora
 
PDF
Container Attached Storage (CAS) with OpenEBS - Berlin Kubernetes Meetup - Ma...
OpenEBS
 
PPTX
Docker Chennai Meetup - OpenEBS Overview
OpenEBS
 
PDF
DCEU 18: Provisioning and Managing Storage for Docker Containers
Docker, Inc.
 
PDF
Red Hat Storage Day LA - Persistent Storage for Linux Containers
Red_Hat_Storage
 
PDF
Docker Volumes - Everything about docker Volumes
ninita397
 
PDF
Storage os kubernetes clusters need persistent data
LibbySchulze
 
DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...
Docker, Inc.
 
Persistence patterns for containers
Stephen Watt
 
WP VERITAS InfoScale Storage and Dockers Intro - v8
Rajagopal Vaideeswaran
 
Meetup docker paris
Aliou BA
 
Highly Available And Distributed Containers - ContainerCon NA 2016
{code}
 
State of the Container Ecosystem
Vinay Rao
 
DockerCon EU 2015: Persistent, stateful services with docker cluster, namespa...
Docker, Inc.
 
Persistent, Portable Storage for Docker Containers and Microservices
ClusterHQ
 
Managing Persistent Storage with Docker Containers by John Griffith and Garre...
Docker, Inc.
 
Emerging storage-trends-for-containers
kiran mova
 
Kubernetes dealing with storage and persistence
Janakiram MSV
 
Storage Integrations for Container Orchestrators
{code} by Dell EMC
 
Persistent storage with containers By Kaslin Fields
Oracle Developers
 
Amsteram Docker meetup - Cloud Native Storage - Chris Brandon
Catalin Jora
 
Container Attached Storage (CAS) with OpenEBS - Berlin Kubernetes Meetup - Ma...
OpenEBS
 
Docker Chennai Meetup - OpenEBS Overview
OpenEBS
 
DCEU 18: Provisioning and Managing Storage for Docker Containers
Docker, Inc.
 
Red Hat Storage Day LA - Persistent Storage for Linux Containers
Red_Hat_Storage
 
Docker Volumes - Everything about docker Volumes
ninita397
 
Storage os kubernetes clusters need persistent data
LibbySchulze
 
Ad

Recently uploaded (20)

PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
July Patch Tuesday
Ivanti
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
July Patch Tuesday
Ivanti
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Biography of Daniel Podor.pdf
Daniel Podor
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Ad

DockerCon 18 docker storage