21/12/2021

[Docker] Redirect app log file to container output

When running applications in containers, we might have log files that are relevant to monitor but are not automatically printed with the container output.

A workaround for this is to force the redirect in our Dockerfile by adding a symbolic link:

RUN ln -sf /dev/stdout /path/to/logfile.log 

Can also be applied to /dev/stderr of course


No comments:

Post a Comment

With great power comes great responsibility