Where to get container's logs on Mac and Windows?

There is no /var/lib/docker folder on Mac and Windows
Where can I find container logs on these platforms?

Docker team recommends to use loki log driver instead of to have file access

IIRC, If you run promtail from within docker I believe in both operating systems you could also mount /var/lib/docker, I believe it exists. for docker on mac and older versions of docker on windows (prior to WSL2), everything is run in a virtual machine (WSL2 is technically a VM but the files are a lot easier to access). The paths are there and accessible if you are trying to reach them from within this virtual machine.

But as you suggested the docker logging driver is a good solution too!

Thanks for your follow up response!

when I configure promtail I should mount to it /var/log/ from a local host
in case Mac or Windows there are no dockers logs in /var/log/docker on the host (they are inside virtual machine) so we can not access them (

I have inspected file system from within docker (have attached to the process in container) - there is no /var/lib/docker folder there

I’m afraid I don’t have a mac system available to me at the moment. I know in the past when I was using a Mac I was able to install promtail via our helm chart in Kubernetes running in Docker for Mac and was able to get container logs (via the filesystem).

That was via Kubernetes though so maybe that’s making this easier/enabling this somehow…