Sharing file between Mac (host) and Docker VM

Hello all,
I have some problem sharing file between Mac and Docker VM, what I’seen reading documents and forums is listed below:

  1. File sharing is configured in Docker Desktop preferences, I have some default folders already configured (Users, Volumes, private, tmp)
  2. Because Docker is running on a VM I was able to get inside the VM using the command:
    screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty
  3. Then I’ve done cd /var/lib/docker to find some folder where I suppose to find the folder shared on point 1, but unfortunately I cannot find.

The questions are 2:

  1. where I can find in the Docker VM the folder shared on Docker Desktop preferences?
  2. where I can find in Mac the folder shared by default on Docker Desktop preferences? (well Users is easy to find but other folders not)

As you have probably understood I am not an export of Linux and Mac, so sorry for the probably stupid question.

I hope it is not a stupid question because I have it too!

Did you manage to fund this information? I am also looking for the shared files in the Docker and I just cannot find it.

I don’t exactly understand the original question. What is that you really need? Nobody should do anything in the virtual machine. You can bind mount host folders and use named volumes depending on whaty ou need

but if you want to browse files on a named volume, you can use docker exec and browse from terminal. Or in case of Docker Desktop, you can browse files using the GUI. It didn’t exist in 2020.