You can import the log directory as a volume when you run your Docker image, and run your command through Docker that way. An example could be running:
$ docker run -v /path/to/log:/working your_image tail -f /working/xxx.log
, where you have to replace
your_image with the name of your image.
-v command requires the path to your folder (within the Host machine) and the location where the path should be mounted to (withing the container). The two locations are place before and after a colon.
In the case above, the path
/path/to/log is the path to your log folder on your machine, and that location it is mounted to
/working within the container. Finally, when running the
tail command, you access your log file through the
/working directory, which is within the container.
More information about all this can be found here!