Is there a way to write dockers log for a specific container, either within the container, or outside of (via API or docker command line)?
So far I have only found options to read the log (docker command line or API).
Share and learn in the Docker community.
Is there a way to write dockers log for a specific container, either within the container, or outside of (via API or docker command line)?
So far I have only found options to read the log (docker command line or API).
If you write to STDERR on the main process inside the container it goes to the logs
Thanks.
That got me thinking. For my example, I created a /tmp/some.log, and then do a “tail -f /tmp/some.log &” in the startup script for the container. All data written to /tmp/some.log then appears in the docker log.