docker-compose


Docker Toolbox Windows - Invalid volume specification


EDIT: The problem is the COMPOSE_CONVERT_WINDOWS_PATHS environment variable isn't getting set. I tried adding it to the Dockerfile and to a .env file but its not being set. I can't set any new environment variables. Its like its building it from a cached Dockerfile.
I was running docker-composer up after deleting the container, but this didn't recreate a new container, even when adding --force-recreate, it created the container from the old Dockerfile. So I ran docker build ./ instead, and it built a new container, it reinstalled all the packages, and it said that it was setting the new environment variables, but in the finished container, when I check kinematic, I see the new environment variables aren't set. But all of the old environment variables that were set when I built the container for the first time, they're all set. I don't know why this is happening, why I can't create a new container from the updated Dockerfile.
I've found a number of threads about this error, it happens when trying to mount a volume in Windows docker-tools. When I run docker-compose up, I get this error:
ERROR: for web Cannot create container for service web: Invalid bind mount spec "C:\\path\\to\\project:/app:rw": Invalid volume specification: 'C:\path\to\project:/app:rw'
[31mERROR[0m: Encountered errors while bringing up the project.
In the docker-compose file I have this:
volumes:
- ./:/app
I tried setting this environment variable:
COMPOSE_CONVERT_WINDOWS_PATHS=1
to 1, as that worked for some people in another thread but its not working in this case. I tried adding an absolute path in linux like format:
volumes:
- /c/path/to/project:/app
and I get this error:
ERROR: for web Cannot create container for service web: create \c\path\to\project: "\\c\\path\\to\\project" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed
Notice it reversed the forward slashes. Changing:
ENV COMPOSE_CONVERT_WINDOWS_PATHS=0
to 0 like that didn't change anything.
If I give a Windows format absolute directory, I get the first error again. Both of those errors, I get them if I point to a directory that doesn't exist.
Has anyone here figured out a way to resolve this?

Related Links

Docker-compose Error-Mean Stack Application won't get loaded with the data from mongodb container
docker-compose Windows volume
Trying to figure out why eslint-watch doesn't work with docker-compose correctly
docker-compose the latest stable version on ubuntu
docker compose environment variable for command
java.net.UnknownHostException: failed to resolve 'inventory-microservice'. Exceeded max queries per resolve 3
What does working_dir tag mean in a docker-compose yml file
If I upgrade an image in docker-compose, will its volumes be lost?
How to solve this docker-compose upgrading error?
Fabric Network - what happens when a downed peer connects back to the network?
Docker-compose and load balancing
Run arguments in Docker Compose
Docker compose file config
Systemd “No such file or directory” itself during “docker-compose up”
Docker compose yml static IP addressing
compose extend file results in a validation error

Categories

HOME
reactjs
javafx
leaflet
ide
network-programming
ssh
reference
postsharp
gaussian
artifactory
grid
perl6
sugarcrm
checkpoint
travis-ci-cli
virtualhost
sitemap
subprocess
soap-client
ios-universal-links
olap
distinct
adroitlogic
tmux
webseal
exchange-transport-agents
bookmarklet
amazon-data-pipeline
novacode-docx
autologin
project-structure
gnu-screen
inline-assembly
ppp
windowserror
pydub
utc
mobile-development
ios9
multilanguage
jql
urhosharp
log4net-configuration
restler
gitosis
sampling
pyenv
device-driver
kepserverex
client-server
framebuffer
latency
idea-plugin
android-graphview
autodesk-data-management
cakephp-3.2
serverless-architecture
denodo
extjs3
sharpdevelop
fluent-nhibernate-mapping
photoshop-script
richtext
fckeditor
opticalflow
jtextarea
google-scholar
eclipse-mars
hfp
gdi
skbio
hana-sql-script
ooad
web-performance
event-tracking
exchange-server-2007
dpkt
xml-simple
euro
transparentproxy
connection-timeout
google-experiments
api-eveonline
dirname
sat4j
kuka-krl
php-amqplib
facebook-likebox
lastinsertid
code-complete
asp.net-4.0
mosix
auctex
quit
correctness
github-archive
win-prolog
zend-validate
xpolog
nbehave
response-time
chromebug
xslt-grouping
linq-to-mysql
qprocess
uccapi
pixel-bender
unauthorized
office-2003

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App