Thank you forums for previous help. That unblocked me to find this new question.
Once I have mounted my host’s /usr/local/
directory so that I can see it as /var/host
in the container, I then want to do this (this is just for demo; I will actually consume this tail, but for now we print it to our terminal):
> tail -f /var/host/logs/myapp/debug.log
This dumps the debug.log
file and keeps it open, waiting for new lines. Those lines will come from programs running on the host.
This works fine initially, but soon I notice that while the host-file: /usr/local/logs/myapp/debug.log
is steadily growing, and tailing it from the host shows all new log lines, I notice that the the container side tail has stalled.
Then I can do this: If I open a shell on the same container and ls -l
the directory:
docker exec -it 9e6214851 ls -l /var/host/logs/myapp/
then all new updates to the debug.log
are pushed and become visible in the container. For now. But I need to repeat the ls -l
for new updates.
Can someone please suggest the flags I need to add to the -v
mount command to make the filesystem be “live” ?
thanks