How would I go about starting an application in my host machine in order to read files and stdout from a running docker container?
Essentially I want to do this:
A bit late but this is what I'm doing with journald. It's pretty powerful.
You need to be running your docker containers on an OS with systemd-journald.
docker run -d --log-driver=journald myapp
This pipes the whole lot into host's journald which takes care of stuff like log pruning, storage format etc and gives you some cool options for viewing them:
journalctl CONTAINER_NAME=myapp -f
which will feed it to your console as it is logged,
journalctl CONTAINER_NAME=myapp > output.log
which gives you the whole lot in a file to take away, or
journalctl CONTAINER_NAME=myapp --since=17:45
Plus you can still see the logs via docker logs .... if that's your preference.
No more > my.log or -v "/apps/myapp/logs:/logs" etc