Giter VIP home page Giter VIP logo

samba's Introduction

samba - (servercontainers/samba) [x86 + arm]

samba on alpine

Changelogs

  • 2021-03-16
    • added support for specifing the uid for each ACCOUNT_ using UID_username=1234214 env.
  • 2021-03-09
    • updated healthcheck to work with external avahi server
  • 2020-12-22
    • added support for samba password hashes instead of just plaintext passwords
  • 2020-12-10
    • added Timemachine Multiuser Support (samba config path needs to end with %U)
  • 2020-12-09
    • bug fix: </service-group> gets removed with multiple timemachine volumes
  • 2020-11-08
    • fixed samba user creation
    • custom avahi service name
  • 2020-11-05
    • multiarch build
    • rewrite from debian to alpine
    • enhanced timemachine support

Info

This is a Samba Server Container running on _/alpine.

Environment variables and defaults

Samba

  • SAMBA_GLOBAL_CONFIG_someuniquevalue

    • add any global samba config to smb.conf
    • example value: key = value
  • ACCOUNT_username

    • multiple variables/accounts possible
    • adds a new user account with the given username and the env value as password or samba hash
      • either you add a simple plaintext password as value (can't start with :username:[0-9]*: or it will be detected as hash)
      • to add a samba hash e.g. user:1002:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:8846F7EAEE8FB117AD06BDD830B7586C:[U ]:LCT-5FE1F7DF: (user: user / password: password) add the line from /var/lib/samba/private/smbpasswd
      • create hash using this command docker run -ti --rm --entrypoint create-hash.sh servercontainers/samba
    • to restrict access of volumes you can add the following to your samba volume config:
      • valid users = alice; invalid users = bob;
  • UID_username

    • optional
    • specify the uid explicitly for each user account.
    • the username part must match to a specified ACCOUNT_username environment variable
  • MODEL

    • optional model value of avahi samba service
    • default: TimeCapsule
    • some available options are Xserve, PowerBook, PowerMac, Macmini, iMac, MacBook, MacBookPro, MacBookAir, MacPro, MacPro6,1, TimeCapsule, AppleTV1,1 and AirPort.
  • AVAHI_NAME

    • optional name of avahi samba service
    • default: hostname
  • SAMBA_CONF_WORKGROUP

    • default: WORKGROUP
  • SAMBA_CONF_SERVER_STRING

    • default: Samba Server
  • SAMBA_CONF_MAP_TO_GUEST

    • default: Bad User
  • SAMBA_VOLUME_CONFIG_myconfigname

    • adds a new samba volume configuration
    • multiple variables/confgurations possible by adding unique configname to SAMBA_VOLUME_CONFIG_
    • take a look at https://wiki.samba.org/index.php/Configure_Samba_to_Work_Better_with_Mac_OS_X -> EXPLANATION OF VOLUME PARAMETERS
    • for timemachine only add fruit:time machine = yes and all other needed settings are automatically added
      • you can also use fruit:time machine max size = 500G; to limit max size of time machine volume
      • if your path variable ends with %U e.g. path = /shares/timemachine/%U; multi user mode gets activated and each user gets their own subdirectory for their own share.

Volumes

  • your shares

    • by default I recommend mounting all shares beneath /shares and configure them using the path property
  • /external/avahi

    • mount your avahi service folder e.g. /etc/avahi/services/ to this spot
    • the container now maintains the service file samba.service for you - it will be overwritten!
    • when mounted, the internal avahi daemon will be disabled

Some helpful indepth informations about TimeMachine and Avahi / Zeroconf

General Infos

You can't proxy the zeroconf inside the container to the outside, since this would need routing and forwarding to your internal docker0 interface from outside. So you need to use the network=host mode to enable zeroconf from within the container

You can just expose the needed Port 548 to the docker hosts port and install avahi. After that just add a new service which fits to your config.

samba's People

Contributors

knapoc avatar marvambass avatar

Watchers

 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.