Volume driver for Docker that can mount with mount cli.
docker plugin install --grant-all-permissions ghcr.io/sa4zet-org/docker.volume.driver.mount.plugin
docker plugin disable ghcr.io/sa4zet-org/docker.volume.driver.mount.plugin
docker plugin rm ghcr.io/sa4zet-org/docker.volume.driver.mount.plugin
All available options are documented here and must be set.
Key | Description |
---|---|
fstype |
The filesystem types which are currently supported depend on the running kernel. |
source |
Mountable source |
options |
Filesystem type specified mount options as a comma-separated list. |
docker run \
--rm \
-it \
--mount='type=volume,destination=/samba.mount/,"volume-driver=ghcr.io/sa4zet-org/docker.volume.driver.mount.plugin","volume-opt=fstype=cifs","volume-opt=source=//samba/share","volume-opt=options=username=user.for.share,password=password.for.share,vers=3.0,dir_mode=0777,file_mode=0777,serverino"' \
debian:sid-slim \
/bin/bash
docker volume create \
--driver="ghcr.io/sa4zet-org/docker.volume.driver.mount.plugin" \
--name="samba.mount" \
--opt="fstype=cifs" \
--opt="source=//samba/share" \
--opt="options=username=user.for.share,password=password.for.share,vers=3.0,dir_mode=0777,file_mode=0777,serverino" \
samba.mount
docker run \
--rm \
-it \
--mount="type=volume,source=samba.mount,destination=/samba.mount/" \
debian:sid-slim \
/bin/bash
https://github.com/sa4zet-org/docker.volume.driver.mount.plugin/blob/master/LICENSE