GithubHelp home page GithubHelp logo

cifs-mount's Introduction

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

cifs-mount's People

Contributors

toilal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.