Volume binding using docker compose on Windows

docker, docker-compose, docker-machine, docker-toolbox, windows

Solution

Use:

volumes:
  - "C:/Users/Joey/Desktop/backend:/var/www/html"

Putting the whole thing in double quotes and using forward slashes worked for me. I was on windows 10 in windows 10 using Linux containers through WSL2

This answer was from Spenhouet given here.

Problem

I recently upgraded my Docker Toolbox on Windows 10, and now my volume mounts no longer work. I've tried everything. Here is the current mount path: ``` volumes: - C:\Users\Joey\Desktop\backend:/var/www/html ``` I receive an invalid bind mount error.

Original source

Related problems