Skip to content

iRobie/moby-cifs-mount

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

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

About

Mount cifs folders inside MobyLinux

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages