patterndockerMinor
Where is it said I can safely the same local volume to multiple docker containers?
Viewed 0 times
localcanthesamedockerwheresaidmultiplecontainerssafely
Problem
According to that StackOverflow answer:
Yes you can add same location as a volume to many docker containers.
But I read the Docker Volume documention and I can't find where it is said a local volume can safely be shared between several containers on the same host. Could someone point me to an official statement regarding that?
Yes you can add same location as a volume to many docker containers.
But I read the Docker Volume documention and I can't find where it is said a local volume can safely be shared between several containers on the same host. Could someone point me to an official statement regarding that?
Solution
By a "local volume" I assume you mean a block device directly attached to the host, such as a "normal" internal disk.
The standard way to run multiple Docker, containers now is Kubernetes, since the demise of Docker Swarm. My reference here is the Kubernetes documentation for Persistent Volumes specifically the table on Access Modes, and the column for ReadWriteMany. A local volume would be a HostPath which is not supported for this use case. However if you were using iSCSI it would support ReadOnlyMany, and if you used NFS you could get ReadWriteMany.
The standard way to run multiple Docker, containers now is Kubernetes, since the demise of Docker Swarm. My reference here is the Kubernetes documentation for Persistent Volumes specifically the table on Access Modes, and the column for ReadWriteMany. A local volume would be a HostPath which is not supported for this use case. However if you were using iSCSI it would support ReadOnlyMany, and if you used NFS you could get ReadWriteMany.
Context
StackExchange DevOps Q#6486, answer score: 1
Revisions (0)
No revisions yet.