dinkel / docker-spamassassin

SpamAssassin as a Docker image
MIT License
16 stars 23 forks source link

Container exits after a while #2

Open NicolasLM opened 7 years ago

NicolasLM commented 7 years ago

First thank you for crafting this image. We've been using it for a while without problems until recently, when it started to stop itself quite quickly:

$ docker run -ti --rm -p 783:783 dinkel/spamassassin
Oct 04 14:33:27.520495 check[11]: [ 2] [bootup] Logging initiated LogDebugLevel=3 to file:/dev/stderr
Oct  4 14:33:29.303 [11] info: spamd: server started on IO::Socket::IP [0.0.0.0]:783 (running version 3.4.1)
Oct  4 14:33:29.303 [11] info: spamd: server pid: 11
Oct  4 14:33:29.306 [11] info: spamd: server successfully spawned child process, pid 14
Oct  4 14:33:29.309 [11] info: spamd: server successfully spawned child process, pid 15
Oct  4 14:33:29.310 [11] info: prefork: child states: IS
Oct  4 14:33:29.310 [11] info: prefork: child states: II

/run.sh: line 25:     7 Terminated              /rule-update.sh
/run.sh: line 25:     8 Terminated              /spamd.sh
NicolasLM commented 7 years ago

Maybe the run.sh tries to do too much. The problem is solved by replacing it by:

#!/bin/bash
set -m

./rule-update.sh &
exec ./spamd.sh

Of course with this approach the container will still run even if the update fails.