If you are having some errors with composing Docker containers which have volumes in Windows there is usual and easy solution.
The problem is usually indicated by the following errors:
1 |
ERROR: for php Cannot create container for service |
1 |
invalid volume specification |
1 |
Encountered errors while bringing up the project. |
There is a simple fix to make errors go away. Docker-Compose simply doesn’t follow the paths the same on Windows as it would on Unix systems.
Create .env file and add there:
1 |
COMPOSE_CONVERT_WINDOWS_PATHS=1 |