Mount cifs shares to Windows docker hosts
10K+
A Simple Docker image to automate mounting a remote CIFS share into the Docker host.
docker run -d \
--privileged --pid=host \
--restart=unless-stopped \
-e SERVER=//server/cifsdir \
-e MOUNT=/mnt/folder \
-e OPTIONS=username=user,password=Password,file_mode=0777,dir_mode=0777 \
thisrepo
and then to use it inside a container
docker run --rm -v /mnt/folder:/data alpine ls /data
It support all Docker platforms that use the Moby Linux.
nsenter to access the host namespace
mount the CIFS on the hostusing the -e MOUNT env from the run command
inotifywait to output logs for any folder changes
I forked this from vipconsoluting in order to make a Windows client happy with a Synology NAS
Content type
Image
Digest
Size
4.8 MB
Last updated
about 9 years ago
docker pull irobie/moby-cifs-mount