Add resource to docker volumes (#6410)

* Update 101-volume-mounts.md

Add a link to help beginners understanding the subtle differences between `-v` and `--mount` flag.

* Update src/data/roadmaps/docker/content/104-data-persistence/101-volume-mounts.md

---------

Co-authored-by: Kamran Ahmed <kamranahmed.se@gmail.com>
pull/6378/merge
Keldon Lee 4 months ago committed by GitHub
parent c27b526de0
commit 6f8852d99d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      src/data/roadmaps/docker/content/104-data-persistence/101-volume-mounts.md

@ -34,6 +34,9 @@ docker run -d --mount source=my-volume,destination=/data your-image
In both examples above, `my-volume` is the name of the volume we created earlier, and `/data` is the path inside the container where the volume will be mounted. In both examples above, `my-volume` is the name of the volume we created earlier, and `/data` is the path inside the container where the volume will be mounted.
> For an in-depth exploration of the `-v` and `--mount` flags, consult Docker's official guide on [Choose the -v or --mount flag](https://docs.docker.com/storage/bind-mounts/#choose-the--v-or---mount-flag).
## Sharing Volumes Between Containers ## Sharing Volumes Between Containers
To share a volume between multiple containers, simply mount the same volume on multiple containers. Here's how to share `my-volume` between two containers running different images: To share a volume between multiple containers, simply mount the same volume on multiple containers. Here's how to share `my-volume` between two containers running different images:

Loading…
Cancel
Save