This blog presents solution to the error “Invalid Volume Specification” when executing “docker-compose up” command.
I got the error when the volume specification in docker-compose.yml file looks like following:
Following is how error may look like:
ERROR: for spark-master Cannot create container for service spark-master: Invalid bind mount spec “c:\\Users\\ashukla\\dockers\\spark\\conf\\spark-master:/conf:rw”: Invalid volume specification: ‘c:\Users\ashukla\dockers\spark\conf\spark-master:/conf:rw’ ←[31mERROR←[0m: Encountered errors while bringing up the project.
The solution to this is following:
- Save a file named as “.env” in the same folder as docker-compose.yml
- Save the following in “.env” file: COMPOSE_CONVERT_WINDOWS_PATHS = 1
Follow him on Twitter and Google+.
Latest posts by Ajitesh Kumar (see all)
- Top 6 Freelance Jobs Websites for 2016-2017 - January 23, 2017
- AngularJS, Angular-UI Router Hello World Starter App – Code Sample - January 22, 2017
- Microservices, Continuous Delivery & AWS Cloud – Part 1 - January 16, 2017