I’m running Docker Compose 1.9.0 on Windows with Docker Toolbox (VirtualBox) as my host. When I follow the “getting started” steps for Compose (https://docs.docker.com/compose/gettingstarted/), I get an “invalid bind mount spec” error.
ERROR: for web Cannot create container for service web: Invalid bind mount spec "C:\\Work\\composetest:/code:rw": Invalid volume specification: 'C:\Work\composetest:/code:rw'
e[31mERRORe[0m: Encountered errors while bringing up the project.
My docker-compose.yml file is exactly as it is in the walk through.
It seems like docker-compose is expanding the relative path in the compose file into an absolute Windows path, which is invalid in the container host environment (which is Linux on VirtualBox).
How is this supposed to work? I understand that VirtualBox has its own volume mounting layer, so I think there are some missing steps in this process (is there a way to get docker-compose to run on the container host within VirtualBox?).
I tried replacing the volume specification in the docker-compose.yml file with an absolute Posix path based on a shared folder mount in VirtualBox, but docker-compose still transforms the path specification into a Windows path by reversing the forward slashes into back slashes, so I get an “invalid characters for a local volume name” error.
I tried installing Docker for Windows, but it enables Hyper-V which doesn’t work with Bitlocker on my company laptop. So, I have to use Docker Toolbox.