Docker run multiple commands, tee to logfile, and missing SIGTERM
<p>I have a problem with docker and redirect internal console output to logfile and I don't know how can I workaround it. In docker compose I run following command</p>

<pre><code>bash -c "./redis-server redis.conf | tee -ai /redis.log"
</code></pre>

<p>Everything is fine except that redis don't receive SIGTERM at "docker-compose stop". It hangs for 10s and after this docker probably send SIGKILL. If I use simple init scripts from this urls:
<a href="https://github.com/krallin/tini" rel="nofollow">Krallin tini</a></p>

<p>or <a href="https://github.com/Yelp/dumb-init" rel="nofollow">Yelp dumb-init</a></p>

<p>Docker stop before 10s timeout, but redis still don't receive SIGTERM and don't create dump.rdb file. Maybe somebody can help?</p>