KYBERNA AG Samba Docker image
This image is a fork of JensErat/docker-samba-publicshare.
Changed the guest user to uid 1000 to work well with data from other containers.
To share a folder, bind it as a volume to the internal path
/srv and expose the ports required by the SMB protocol. An example would be
docker run -d \ --publish 445:445 \ --publish 137:137 \ --publish 138:138 \ --publish 139:139 \ --volume /srv/samba:/srv \ kyberna/samba
Use the optional
workgroup environment variable to set the workgroup:
The repository contains a wrapper script to easen up sharing folders, automatically exposing the ports as needed. Pass the path as first parameter (otherwise the working directory is shared), and optionally the work group as second parameter.
samba-publicshare [path [workgroup]]
/tmp with the default workgroup name, run
samba-publicshare /tmp. To share the working directory, run
samba-publicshare without any parameters.
By mounting a volume read-only, the share will be read-only, but simply because of Samba not being able to write to the directory and thus returning an access denied error message, not by passing correct read-only permissions to the client.
I didn't figure out a way yet to terminate Samba in foreground mode by pressing keys. Use
docker stop [name] instead.
No access restrictions are applied, the shared folder is publically readable and writable! Reconsider usage in public networks.