I've been struggling with this issue for over a day now, and although there are similar questions here on SO and on other places, none really match my problem, or solve it. For context, I have no problems using docker, only docker compose.
I'm working on an older project that uses docker compose, in a WSL environment. When I run:
docker-compose -f /srv/etc/docker/docker-compose.yml -f /srv/etc/docker/docker-compose.prod.yml up --build
I get the following error:
OSError: Can not read file in context: \\?\C:\Users\<path>\venv\bin\python
Others with similar problems had their path start at /mnt/c, which can be solved by mounting /c to that directory. However, my incorrect path doesn't match others I have seen on similar questions.
Regardless, I tried the mounting solution and it didn't change my problem.
I have also seen mentions of docker engine use wsl, but docker engine check doesn't show a wsl one, only one called current.
I have followed the steps on this article to have WSL use Docker for Windows, which I have seen mentioned in similar questions as something the OP did previously, or as a suggestion to fix the problem.
So, a couple of questions:
- Does anyone know why Docker compose is trying to use such a strange path?
- How can I fix this path?