Persisting logfiles with multiple containers

You check whether setting a variable for the log file filename might work for you.

I tested out the available placeholders a while back:

If your containers don’t log to console or /dev/stdout and /dev/stderr, you need to make sure to take care of trimming the logs yourself to make sure they don’t grow infinitely. The docker way would be to print the logs to console or /dev/stdout and /dev/stderr, as it allows showing the logs with docker logs or docker service logs.