docker run --mount type=bind,source=<hostpath>,target=<containerpath> <image> |
Mount path from host into a container |
docker run --mount type=bind,source=<hostpath>,target=<containerpath>,readonly <image> |
Mount path from host into a container as readonly |
docker run --mount type=bind,source=${PWD}/<hostpath>,target=<containerpath> <image> |
Mount path from host relative to the current directory into a container |
docker run --mount source=<volume>,target=<containerpath> <image> |
Mount volume into a container |
docker container inspect -f "{{.Mounts}}" <container> |
Show volumes of a container |
docker run -v ${PWD}/<hostpath>:<containerpath>:ro <image> |
Old spelling: Usage like --mount |