Mount Multiple Data Volumes and Multiple Data Volume Containers in Docker
Multiple Data Volumes from a Single Container
Create and run multiple data volumes in a container:
|
|
Mount the data volumes in a new container:
|
|
Both volumes will be mounted under the root directory as /vol1
and /vol2
.
Multiple Data Volume Containers
Create and run multiple data volume containers:
|
|
Mount multiple data volume containers:
|
|
Now there are also two volumes mounted under the root directory as /vol1
and /vol2
, one from each container.
Multiple Data Volume Containers But Sharing the Same Data Volume Name
Create multiple data volume containers with the same data volume name /vol
:
|
|
Mount multiple data volume containers:
|
|