samba-server copy from elswork/samba
10K+
用于在linux上直接用docker启动一个samba服务
预期
docker run -d -p 139:139 -p 445:445 \
-- hostname any-host-name \ # Optional
-e TZ=Europe/Madrid \ # Optional
-v /any/path:/share/data \ # Replace /any/path with some path in your system owned by a real user from your host filesystem
langren1353/samba-server \
-u "1000:1000:alice:alice:put-any-password-here" \ # At least the first user must match (password can be different) with a real user from your host filesystem
-u "1001:1001:bob:bob:secret" \
-s "Backup directory:/share/backups:rw:alice,bob" \
-s "Alice (private):/share/data/alice:rw:alice" \
-s "Bob (private):/share/data/bob:rw:bob" \
-s "Documents (readonly and public):/share/data/documents:ro:"
我这里是这么用的:
docker run -d -p 139:139 -p 445:445 -e TZ=Europe/Shanghai \
-v /home/目录1:/share/privateFolder \
-v /home/目录2:/share/publicFolder \
langren1353/samba-server \
-u "1000:1000:admin:admin:密码" \
-s "私有目录:/share/folder:rw:admin"
-s "公共目录:/share/folder:rw:"
or this if the user that owns the path to be shared match with the user that raise up the container:
docker run -d -p 139:139 -p 445:445 --hostname $HOSTNAME -e TZ=Europe/Madrid \
-v /home/pirate/docker/makefile:/share/folder langren1353/samba-server \
-u "$(id -u):$(id -g):$(id -un):$(id -gn):put-any-password-here" \
-s "SmbShare:/share/folder:rw:$(id -un)"
On Windows point your filebrowser to \\host-ip\ to preview site.
Content type
Image
Digest
sha256:df761601a…
Size
21.7 MB
Last updated
about 2 years ago
docker pull langren1353/samba-server