With Docker for Windows 10 pro Hyper-V I work normally with File sharing. So in the Docker Desktop section Resources I add a folder like K:\data on my Windows host. This works well for me for many years.
So my current configuration is:
- Windows 10 pro
- Data folder on Windows 10 HOST is e.g.
K:\data - Docker for Windows with Hyper-V
- Docker compose (stack) file with 2 Docker images: MySql and Jenkins.
- Docker components both access the data that is (via a volume specification) residing on the Windows host.
I investigate if I can switch to Docker for Windows WSL2. Then I would like to continue using the docker compose file with the 2 Docker containers. I would like to continue using the data that is residing on the Windows host. More specifically, on the K:\data.
Is it possible to switch from Docker for Windows with Hyper-V to Docker for Windows WSL2 and still use the existing data residing in the Windows folder?
This is not a duplicate question: I work with Docker compose, so I don't want to use the "docker run -v 'host'" solution. In my docker compose file I use e.g. the following line:
volumes:
- //k/data/spring-boot-app:/data/spring-boot-app
This question gets more important because since the new 2.5+ version, the Hyper-V version is hardly working on my standard Win10pro. The WSL2 worked immediately.
I pose this question as a simple user question, so others may benefit from it. I know that there is a world behind this topic.