ServerContainers / samba

samba - (ghcr.io/servercontainers/samba) (+ optional zeroconf, wsdd2 & time machine) on alpine [x86 + arm]
447 stars 57 forks source link

Multiline not working #119

Closed ptrsr closed 9 months ago

ptrsr commented 9 months ago

Hi, thank you for developing this awesome docker image! I have tried using the multi-line feature on tag smbd-wsdd2-a3.19.0-s4.18.9-r0 like so;

  samba:
    container_name: samba
    image: ghcr.io/servercontainers/samba:smbd-wsdd2-a3.19.0-s4.18.9-r0
    network_mode: host
    cap_add:
      - NET_ADMIN
    environment:
      SAMBA_CONF_LOG_LEVEL: 3
      ACCOUNT_user: test
      UID_user: 1001
      SAMBA_VOLUME_CONFIG_test: |
        [test]
         path = /samba
         available = yes
         browsable = yes
         writable = yes
         read only = no
         valid users = user
    volumes:
      - ./samba:/samba

However, the resulting smb.conf does not seem to include the volume config;

samba    | >> SAMBA: check smb.conf file using 'testparm -s'
samba    | ############################### START ####################################
samba    | Load smb config files from /etc/samba/smb.conf
samba    | # Global parameters
samba    | [global]
samba    | WARNING: No path in service test - making it unavailable!
samba    | NOTE: Service test is flagged unavailable.
samba    | Loaded services file OK.
samba    | Weak crypto is allowed by GnuTLS (e.g. NTLM as a compatibility fallback)
samba    | 
samba    | Server role: ROLE_STANDALONE
samba    | 
samba    |      disable netbios = Yes
samba    |      dns proxy = No
samba    |      load printers = No
samba    |      log file = /dev/stdout
samba    |      map to guest = Bad User
samba    |      obey pam restrictions = Yes
samba    |      passdb backend = smbpasswd
samba    |      printcap name = /dev/null
samba    |      security = USER
samba    |      server role = standalone server
samba    |      server string = Samba Server
samba    |      smb1 unix extensions = No
samba    |      fruit:aapl = yes
samba    |      fruit:model = TimeCapsule
samba    |      idmap config * : backend = tdb
samba    |      acl allow execute always = Yes
samba    |      vfs objects = catia fruit streams_xattr
samba    |      wide links = Yes
samba    | 
samba    | 
samba    | [test]
samba    |      available = No

Note that the [test] section does not correspond to the SAMBA_VOLUME_CONFIG_test configuration. I have tried multiple ways of indentation, but it does not seem to influence the outcome.

MarvAmBass commented 9 months ago

thanks for raising this issue, I'll have a look soon

MarvAmBass commented 9 months ago

I found the issue.

this is a new feature - I've only rebuild the latest tag. it will be available once a new alpine or samba version is available.

I had to optimize building - right now a version won't be released if there is no update - had many user request this - so I don't rebuild daily.

maybe I improve this in the future and make a new version feature for this container logic

solutions for you:

ptrsr commented 9 months ago

Thanks!