Exits as soon as it has started
The containers exit immediately after starting with ./docker-samba launch
The log output is:
smbd version 4.3.9-Ubuntu started.
Copyright Andrew Tridgell and the Samba Team 1992-2015
STATUS=daemon 'smbd' finished starting up and ready to serve connections
nmbd version 4.3.9-Ubuntu started.
Copyright Andrew Tridgell and the Samba Team 1992-2015
STATUS=daemon 'nmbd' finished starting up and ready to serve connections
EOF on stdin
Got SIGTERM: going down...
Running the container manually not in daemon mode works docker run --rm -it -v $PWD/etc/samba:/etc/samba ewindisch/samba-nmbd $@ but this is less than ideal.
+1
Smbd exits when it receives an EOF,. Dockers puts EOF on the stdin when it starts a daemonized container. Use a wrapper to avoid smbd receiving EOF.
CMD /usr/sbin/smbd < /dev/null
@hzsolt94 great, can you make that a PR?
@ewindisch Sorry, but I'm not using your code, so I can't properly test this out to make a PR. Something like that will do:
samba-smbd/Dockerfile
@@ -6,5 +6,4 @@
expose 445
expose 139
expose 135
-entrypoint ["/usr/sbin/smbd"]
-cmd ["-F", "-S"]
+cmd /usr/sbin/smbd -FS < /dev/null
aaargh
@episage the latter works for me, took me a min to figure out wtf was going on then I realized how counter intuitive it was to comma separate parameters if you don't have to. The former wouldn't work for me
#CMD [ "/usr/sbin/smbd", "-F", "-S", "-s", "/etc/samba/smb.conf", "-d3", "<", "/dev/null"]
CMD /usr/sbin/smbd -FS -d3 < /dev/null
Funny thing. I found myself facing exactly the same problem 3 years later haha
still doesn't work for me haha
FYI --no-process-group solves the problem
smbd -FS --no-process-group