Sign inSign up

pengshp/samba

By pengshp

•Updated almost 3 years ago

Samba4 for muil-arch images

Image
0

478

pengshp/samba repository overview

Refrence: https://github.com/pengshp/samba⁠

⁠Usage

docker run -d -p 445:445 --hostname $HOSTNAME -e TZ=Asia/Shanghai \
    -v /media:/share pengshp/samba \
    -u "$(id -u):$(id -g):$(id -un):$(id -gn):pw" \
    -s "SmbShare:/share:rw:$(id -un)"

⁠docker-compose.yaml

version: '3.8'

services:
  samba:
    image: pengshp/samba
    container_name: samba4
    command: '-u "1000:1000:share:share:pw" -s "SmbShare:/share:rw:share"'
    # command: '-u "uid:guid:username:groupname:password" -s "SmbShare:/share:rw:username"'
    environment:
      - TZ: 'Asia/Shanghai'
    network_mode: host
    volumes:
      - ${pwd}/data/:/share
    restart: unless-stopped
$ docker-compose up -d
$ docker-compose logs -f -n 20

Container will be configured as samba sharing server and it just needs:

  • host directories to be mounted,
  • users (one or more uid:gid:username:usergroup:password tuples) provided,
  • shares defined (name, path, users).

⁠-u uid:gid:username:usergroup:password
  • uid from user p.e. 1000
  • gid from group that user belong p.e. 1000
  • username p.e. alice
  • usergroup (wich user must belong) p.e. alice
  • password (The password may be different from the user's actual password from your host filesystem)

⁠-s name:path:rw:user1[,user2[,userN]]

add share, that is visible as 'name', exposing contents of 'path' directory for read+write (rw)

or read-only (ro) access for specified logins user1, user2, .., userN

On Windows point your filebrowser to \\host-ip\ to preview site.

Tag summary

Content type

Image

Digest

sha256:e8fde7e24…

Size

19.5 MB

Last updated

almost 3 years ago

docker pull pengshp/samba