gdiepen / volume-sharer Goto Github PK
View Code? Open in Web Editor NEWDocker data volume sharer
License: GNU Affero General Public License v3.0
Docker data volume sharer
License: GNU Affero General Public License v3.0
I'd like to use this image to also share local folders on the docker host.
How could one proceed to do so?
I've tried to bind mount a local path to a submount in /docker_volumes
with no success.
docker run --name volume-sharer --rm -v /var/lib/docker/volumes:/docker_volumes -v /home/myName/test:/docker_volumes/uniqueNameTest -p 139:139 -p 445:445 -v /var/run/docker.sock:/var/run/docker.sock -d gdiepen/volume-sharer
I was repeatedly getting the following line in the container logs:
process_usershare_file: stat of /var/lib/samba/usershares/storage failed. No such file or directory
Solution/fix appears to be adding
usershare path =
to the smb.conf file. Which is pretty easy to do with the volume shared :)
My solution was sourced from here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=772154
The gist:
This is not a bug but a feature.
The samba 3.6.x has as default: usershare path = /var/lib/samba/usershares
if a user enters a wrong path somewhere it falls back to the usershares and this share cannot be found there.
To get rid of this message do the following.
Define the following and disable usershares. in smb.conf (global)
usershare path =
Maybe there's a bad path coming from somewhere that is triggering this fallback?
Despite the log message, the container was still functioning as expected, from a user point of view.
Hi,
I just tried to run it on my mac
docker run -d --rm \
--name volume-sharer \
-p 139:139 -p 445:445 \
-v /var/lib/docker/volumes:/docker_volumes \
-v /var/run/docker.sock:/var/run/docker.sock \
-d gdiepen/volume-sharer
and got this error
d66363d0077417d666f45d720c21728ab9330e4721e08a8841edf12577da85b1
docker: Error response from daemon: driver failed programming external connectivity on endpoint volume-sharer (c25835650f999bc4c8c4b8fa18a0037066b31430e21d08745e09c2ce51be8300): Error starting userland proxy: Bind for 0.0.0.0:445: unexpected error (Failure EADDRINUSE).
Maybe it's not made to run on a Mac but I'm taking a chance!
Would it be possible to add an additional share containing all (named) volumes? That way, one can add a network drive to the explorer and assign a drive letter to it. (It doesnt seem possible to add a network drive for the whole server at 10.0.75.2)
Hi,
I'd like to make changes to the samba config and would like the volume to be persistent, how can I add this? I tried adding another -v option, but it didn't work (I'm new to docker).
Hi,
In my smb.conf I have 30+ lines of:
include = /etc/samba/cli_shares.conf
include = /etc/samba/volume_shares.conf
2 more are added with each restart of the docker...
Is it caused by these 2 lines?
volume-sharer/volume-sharer.sh
Line 246 in 443c5b1
Starting the VM with docker run --name volume-sharer --rm -v /var/lib/docker/volumes:/docker_volumes -p 139:139 -p 445:445 -v /var/run/docker.sock:/var/run/docker.sock --net=host -d gdiepen/volume-sharer
Results in WARNING: Published ports are discarded when using host network mode
and I'm unable to connect to the docker vm via smb in explorer, so it seems something has changed with how host networking works in current Docker for Windows, unless I'm missing something. Thoughts?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.