I am very new at using Docker, so I’m trying to understand some of its basic concepts. Docker is running on my WSL2, with its volumes being stored in my host machine at \wsl.localhost\docker-desktop-data\mnt\wslg\distro\data\docker\volumes
However, when I try to navigate thorugh bash on /mnt/wsl/docker-desktop-data/data with sudo ls -a, no file nor folder is shown.
Is there a way I can access it through bash? And why can’t I see the available directories through bash?
I don’t know, but why would you want to access those folders from WSL? You can do it in a container. You can run a container from an image that has an editor too, if you want to edit, but I don’t recommend it. Of course, you already know how to access the volumes from windows explorer. Here is my full blogpost about accessing volumes mentioning all the supported platforms (Linux, macOS and Windows)
If you really need to access volumes from the host shell, use a volume with custom host path.
The docker-desktop-data distribution was not built to work with it directly.
I wanted to access it to understand more of how Docker works, as I am struggling a bit to understand how data is stored using Docker. I am currently trying to use Airflow running docker and executed a bash command mkdir /data/events, but I dont understand where it is stored, and how I can view/access it.
I will have a good read on your blogpost, thank you Ákos