Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Implementing Modern DevOps

You're reading from   Implementing Modern DevOps Enabling IT organizations to deliver faster and smarter

Arrow left icon
Product type Paperback
Published in Oct 2017
Publisher Packt
ISBN-13 9781786466877
Length 326 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Danny Varghese Danny Varghese
Author Profile Icon Danny Varghese
Danny Varghese
 Gonzalez Gonzalez
Author Profile Icon Gonzalez
Gonzalez
Arrow right icon
View More author details
Toc

Docker volumes


So far, we have seen how to create images, how to store the images in a registry, and how Docker images work in general (layers and containers versus images). An important part of any application is the storage. In general, Docker applications should be stateless, but with the new orchestration software, such as Kubernetes, Docker Swarm, and similar, every day, more and more engineers are moving toward containerized databases. Docker solves this problem in a very elegant way: you can mount a folder from the local machine into the container as if it were a normal folder. This is a very powerful abstraction as it leverages the ability to push data out of the container to be saved into a Network Attached Storage (NAS) or any other storage technology (it is possible to use a bucket in the Google Cloud Storage or S3 as the volume mounted in a container).

Let's start with the basics. Just run a MySQL database:

docker run --name my-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images