I want to locate a container's log location.
- I use Docker Desktop for Windows
- I know that on linux they are at
/var/lib/docker/containers/
But where is it. Is it hidden away somewhere in an inaccessible VM?
I want to locate a container's log location.
/var/lib/docker/containers/
But where is it. Is it hidden away somewhere in an inaccessible VM?
For windows , the container storage is the Hyper V's virtual Hard disk.You would have to connect to that hard disk to get the container logs.
See this lonk for more details :https://forums.docker.com/t/where-are-images-stored/9794/7
Windows 10 + WSL 2 (Ubuntu 20.04), Docker version 20.10.2, build 2291f61
docker info --format '{{.LoggingDriver}}'
'json-file'
docker inspect --format='{{.LogPath}}' <Some_Container_id>
'/var/lib/docker/containers/bb69ae7df957c5f8c8b6d63372aa9cf9b94fa6ef0e44ccecbccb6d190baadb51/bb69ae7df957c5f8c8b6d63372aa9cf9b94fa6ef0e44ccecbccb6d190baadb51-json.log'
Docker Artifacts are stored in following location
DOCKER_ARTIFACTS == \\wsl$\docker-desktop-data\version-pack-data\community\docker
Location of container logs
DOCKER_ARTIFACTS\containers\[Your_container_ID]\[Your_container_ID]-json.log
Here is an example:
On windows you can find the containers logs inside: