Dev, Sec & Ops
Published in

Dev, Sec & Ops

Docker 101: Volume & Bind Mounting

A beginner’s introduction to Docker & why it’s awesome?

Let’s recap!

Volume Mounting

Volume Mounting

$ docker volume create data_volume
$ docker run -v data_volume:/var/lib/mysql mysql
$ docker run -v data_volume2:/var/lib/mysql mysql
Bind Mounting

Bind Mounting

$ docker run -v /data/mysql:/var/lib/mysql mysql
$ docker run \
--mount type=bind, source=/data/mysql, target=/var/lib/mysql mysql

Storage Drivers



Follow us on Dev, Sec & Ops to read related articles.



This is to give you guys a closer look at the DevSecOps world. The new technologies that are used to deploy these amazing services we love, the security work that goes into it and the operations that take place behind the scenes.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store