W
W
web_dev2020-05-25 14:44:12
linux
web_dev, 2020-05-25 14:44:12

Docker logs, write/read to console output(STDOUT)?

There is an application in a docker container that writes logs to a file.
I want the contents of this file to be visible when docker logs is called.
Found how to redirect docker out to a file, but vice versa?
https://github.com/moby/moby/issues/19616#issuecom...

How do I make docker read the file when I call docker logs or vice versa how to write the file's capacity to docker logs (output) all the time?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Armenian Radio, 2020-05-25
@web_dev

Map the desired file inside docker to stdout ln -sf /dev/stdout /var/log/nginx/access.log

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question