Sign inSign up

irobie/moby-cifs-mount

By irobie

Updated about 9 years ago

Mount cifs shares to Windows docker hosts

Image
0

10K+

irobie/moby-cifs-mount repository overview

A Simple Docker image to automate mounting a remote CIFS share into the Docker host.

Usage
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
  • SERVER : the remote CIFS share
  • MOUNT : local host folder used for the mounting

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.

  • Docker for Mac (untested)
  • Docker for AWS
  • Docker for Windows
  • Should work on any Alpine docker host
Here is how it works:

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

NOTES:

I forked this from vipconsoluting in order to make a Windows client happy with a Synology NAS

Tag summary

Content type

Image

Digest

Size

4.8 MB

Last updated

about 9 years ago

docker pull irobie/moby-cifs-mount