You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Docker-compose rejects windows style volume mappings #3897
FYI if I use "/C/Foo:/C/Bar:ro" instead the error is:
ERROR: for foo Invalid volume spec "/C/Bar": Invalid volume specification: '/C/Bar'
Traceback (most recent call last):
File "", line 3, in
File "compose\cli\main.py", line 63, in main
AttributeError: 'ProjectError' object has no attribute 'msg'
docker-compose returned -1
PS > docker-compose --verbose config
compose.config.config.find: Using configuration files: .\docker-compose.yml
ERROR: compose.cli.main.main: Volume C:\Foo:C:\Bar:ro has incorrect format, should be external:internal[:mode]
PS C:\compose1> docker-compose up -d
Creating compose1_shell_1
ERROR: for shell Cannot create container for service shell: Invalid volume spec "/c/shared": Invalid volume specification: '/c/shared'
ERROR: Encountered errors while bringing up the project.
I am also running docker-compose version 1.8.0, build d988a55
C:\Users\vagrant\test> docker-compose up -d
Creating test_shell_1
ERROR: for shell Cannot create container for service shell: invalid volume spec "/c/shared": invalid volume specification: '\c\shared'
�[31mERROR�[0m: Encountered errors while bringing up the project.
Downloading artifact and testing again:
C:\Users\vagrant\test> wget -outfile docker-compose.exe https://ci.appveyor.com/api/buildjobs/mjk334rrdx7p591d/artifacts/dist%2Fdocker-compose-Window
s-x86_64.exe
C:\Users\vagrant\test> .\docker-compose.exe up -d
�[33mWARNING�[0m: The COMPOSE_CONVERT_WIN32_PATHS variable is not set. Defaulting to a blank string.
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "compose\cli\main.py", line 62, in main
File "compose\cli\main.py", line 114, in perform_command
File "compose\cli\main.py", line 835, in up
File "compose\project.py", line 372, in up
File "compose\project.py", line 539, in warn_for_swarm_mode
File "site-packages\docker\api\daemon.py", line 33, in info
File "site-packages\docker\utils\decorators.py", line 47, in inner
File "site-packages\docker\client.py", line 139, in _get
File "site-packages\requests\sessions.py", line 477, in get
File "site-packages\requests\sessions.py", line 465, in request
File "site-packages\requests\sessions.py", line 573, in send
File "site-packages\requests\adapters.py", line 370, in send
File "site-packages\requests\packages\urllib3\connectionpool.py", line 544, in urlopen
File "site-packages\requests\packages\urllib3\connectionpool.py", line 374, in _make_request
File "httplib.py", line 1133, in getresponse
File "httplib.py", line 390, in __init__
File "site-packages\docker\transport\npipesocket.py", line 99, in makefile
ValueError: buffer size must be strictly positive
docker-compose returned -1
@StefanScherer Thanks - looks like we still have some challenges with named pipe support. In the meantime you can work around this by connecting via TCP using the DOCKER_HOST environment variable.
Building db
Step 1 : FROM mysql:5.5
---> 98ae577069d3
Step 2 : COPY www.sql /docker-entrypoint-initdb.d
---> Using cache
---> 0111b4d94141
Successfully built 0111b4d94141
Recreating db
Recreating 5b0969d43690_wordpress
ERROR: for wordpress Cannot create container for service wordpress: Invalid bin
d mount spec "C:\\Users\\realtebo\\Downloads\\new\\actual-wordpress\\www:/va
r/www/html:rw": Invalid volume specification: 'C:\Users\realtebo\Downloads\n
ew\actual-wordpress\www:/var/www/html:rw'
←[31mERROR←[0m: Encountered errors while bringing up the project.
I'm on Windows 7, so no PowerShell. My cli is inside MINGW64.
ERROR: for wordpress Cannot create container for service wordpress: create \c\U
sers\realtebo\Downloads\new\actual-wordpress\www: "\c\Users\realtebo
\Downloads\new\actual-wordpress\www" includes invalid characters for a local
volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed
ERROR: Encountered errors while bringing up the project.
$ docker --version
Docker version 1.12.6, build 78d1802
$ docker-compose --version
docker-compose version 1.10.0, build 4bd6f1a0
@realtebo You say you're on Win7, I assume that means you're working with Docker Machine? If so, did you enable the COMPOSE_CONVERT_WINDOWS_PATHS environment variable? See docs here
Activity
friism commentedon Aug 31, 2016
cc @dgageot
NCarlsonMSFT commentedon Aug 31, 2016
FYI if I use "/C/Foo:/C/Bar:ro" instead the error is:
ERROR: for foo Invalid volume spec "/C/Bar": Invalid volume specification: '/C/Bar'
Traceback (most recent call last):
File "", line 3, in
File "compose\cli\main.py", line 63, in main
AttributeError: 'ProjectError' object has no attribute 'msg'
docker-compose returned -1
shin- commentedon Aug 31, 2016
@NCarlsonMSFT I think you're using an older version of compose, can you try upgrading to 1.8.0?
shin- commentedon Aug 31, 2016
It's a duplicate of #2487, which we fixed in 1.8.
NCarlsonMSFT commentedon Aug 31, 2016
I was on an older build, I switched to "docker-compose version 1.8.0, build d988a55" and am still getting the errors
shin- commentedon Aug 31, 2016
Can you share the full output of
docker-compose --verbose config?NCarlsonMSFT commentedon Aug 31, 2016
NCarlsonMSFT commentedon Aug 31, 2016
Interestingly if I run
docker-compose --verbose configon the v2 equivalent of the file that succeeds:PatrickLang commentedon Sep 2, 2016
here's another variation:
I created a directory and file on the host:
And here's the docker-compose.yml:
It parsed ok:
But failed to run:
I am also running
docker-compose version 1.8.0, build d988a55shin- commentedon Sep 8, 2016
Thank you for providing more details. I think I identified what the problem is and will be working on a fix.
2 remaining items
friism commentedon Oct 11, 2016
New build available: https://ci.appveyor.com/project/docker/compose/build/master-2420/artifacts
StefanScherer commentedon Oct 11, 2016
Quick test:
Test with docker-dompose 1.8.1:
Downloading artifact and testing again:
shin- commentedon Oct 11, 2016
@StefanScherer Thank you for testing. What does it say when you run
.\docker-compose.exe version?StefanScherer commentedon Oct 11, 2016
@shin-
StefanScherer commentedon Oct 11, 2016
And now without double dashes:
shin- commentedon Oct 11, 2016
@StefanScherer Thanks - looks like we still have some challenges with named pipe support. In the meantime you can work around this by connecting via TCP using the
DOCKER_HOSTenvironment variable.StefanScherer commentedon Oct 11, 2016
@shin- Thanks! Yes, setting
DOCKER_HOSTto TCP works.But colored output in PowerShell also needs some care:
shin- commentedon Oct 11, 2016
@StefanScherer Thank you!
And agreed re: coloring. I think we have an issue open for that.
realtebo commentedon Jan 24, 2017
Same issue on windows 7.
My intent is to copy the content of dir
C:\Users\realtebo\Downloads\new\actual-wordpress\wwwinto/var/www/htmlMy docker-compose.yaml is inside
C:\Users\realtebo\Downloads\new. Here is the relevant sectionAbout docker-compose itselfs:
The error:
I'm on Windows 7, so no PowerShell. My cli is inside MINGW64.
what can I do?
shin- commentedon Jan 24, 2017
@realtebo Please update to docker-compose 1.10
realtebo commentedon Jan 25, 2017
@shin
EDIT: I Googled around and discovered release page on Github, so i'm installing this:
https://github.com/docker/compose/releases/download/1.10.0/docker-compose-Windows-x86_64.exe
realtebo commentedon Jan 25, 2017
For love of documenting and debugging, I tried to change declaration in the yaml file as is:
And error is changed:
realtebo commentedon Jan 30, 2017
@shin: any news on a new patch for windows users?
shin- commentedon Jan 30, 2017
@realtebo You say you're on Win7, I assume that means you're working with Docker Machine? If so, did you enable the
COMPOSE_CONVERT_WINDOWS_PATHSenvironment variable? See docs hererealtebo commentedon Jan 31, 2017
@shin- : I created a
.envfile inside the same folder ofdocker-compose.yml.This is the actual content of the file
Now it's working. Thanks.
Please, add it to the doc in the section about VOLUME of docker compose