For Windows 10 + Docker Desktop version 3.6.0
, the virtual path for logs and data (artifacts) is \\wsl$\docker-desktop-data\version-pack-data\community\docker
(you can copy/paste it in Explorer navigation bar).
The logs are at \\wsl$\docker-desktop-data\version-pack-data\community\docker\containers\[containerID]\[containerID]-json.logs
and the data is under \\wsl$\docker-desktop-data\version-pack-data\community\docker\volumes\[volumeID]\_data
How to get containerID:
You can find container ID
(truncated) by running docker ps
in a command prompt. You can also find it by clicking the CLI
button on DockerDesktop next to the container name, the id will be in the title of the cmd window that will pop up.
Once you have the id, you can navigate to containers\[containerID]
under the artifacts directory (\\wsl$\docker-...
above). The log file will have the .log
extension and its name will have the containerID
in it. Keep in mind that it will be an enriched json format though, so not easily readable.
How to get volumeID:
To find a container's data (for example kafka broker topics), you need to find the id of the volumes where the data is stored. For that you will need to click on the container in DockerDesktop, then click INSPECT
(top right). You can then scroll down to find Mounts
configuration entries. Each mount will have a volumeID (different from containerID), and that volumeID will be part of a path similar to this one /var/lib/docker/volumes/71f7a5992c58fdcf229c3848acb014712f34fab380bc7c712cf5a0a632fe9110/_data
. volumeID
here being 71f7a5992c58fdcf229c3848acb014712f34fab380bc7c712cf5a0a632fe9110
.
You can then take volumeID
and navigate to volumes\[volumeID]
under the artifacts directory (\\wsl$\docker-...
above) where the data will be located.