I am using WSL2 with Docker Desktop 3.3.3 (Latest). When I use docker containers inside a WSL2, I am not able to mount the required WSL2 files. Docker run will not give any issues, but it shows empty folder inside a container.
Any idea on this?
Suppose you want to mount a directory named "mydir", use the command:
docker run -it --name container_name -v /mydir:/mnt image_name:version
Here, /mnt is the workspace inside the container where the files of "mydir" will be accessible.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.