New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relative paths for -f are broken, and --project-directory appears to be stillborn #4710
Comments
We have got users reporting the same issue: https://developercommunity.visualstudio.com/content/problem/40763/docker-compose-using-incorrect-path.html |
Thank you for the report, we'll take a look ASAP. |
I tried a simple reproduction of this based on your report but I can't seem to be able to reproduce. Here's what I'm doing:
Did I miss something? Are you able to share your Thanks. |
It appears the error message is related to the
|
After removing the
And the error message is gone (the error is not, though):
Note the erroneous path translation on the volume mount, which should have been |
Thank you for taking a closer look. I have a patch for this in #4713 if you're able to check it out and verify it works for you as well. |
@shin- Do you have private bits with the fix somewhere? I'd like to try it out as well. |
@dazhao-msft For Windows, you can download the Appveyor artifact here: https://ci.appveyor.com/project/docker/compose/build/master-3146/artifacts |
I've verified that the issue reported at https://developercommunity.visualstudio.com/content/problem/40763/docker-compose-using-incorrect-path.html also gets fixed by the change. Thanks for the quick turnaround! |
@shin- This issue completely blocks the users from using Docker CE for Windows with Visual Studio. We hope to get this fix in ASAP. Thanks! |
Hi @shin, Thanks, |
@dazhao-msft this is targeted for 17.05! |
The fix from above fixed my problem as well. |
I'm using Docker Toolkit for macOS, and I'm seeing this exact problem... but I'm on 17.06? and I'm up to date according to:
What's the status of this issue with macOS? Cheers |
@dlgoodchild The stable branch of Docker 4 Mac doesn't always include the latest version of Compose. While the issue reported here was fixed in 1.13, you might be running into another bug with similar symptoms. Please try with Compose 1.16.1 and open a new issue if you see the problem persist. |
Not able to fix the below error. Any help in this matter is really appreciated. gzip: stdin: not in gzip format I tried to install unp on Mac so that it can support (tat.gz) file. But no luck so far |
|
Our code-project is structure such that all the docker related stuff resides in a sub-folder
./docker
including./docker/docker-compose.yml
and various files and folders (e.g../docker/nginx/nginx.conf
) to be volume-mounted by docker-compose using relative paths.Our build job used to invoke
docker-compose
from the project root (e.g./workspace/project
) with the-f ./docker/docker-compose.yml
option, which started to fail since the update to 1.12.0, complaining that it couldn't find/workspace/project/nginx/
for mounting, which clearly should have been/workspace/project/docker/nginx/
. I can change directory to/workspace/project/docker
to avoid using the-f …
option, to work around the problem. However, this clearly is a bug introduced in recent docker-compose, since nothing has changed in our project except the update to 1.12.0 (from 1.11.0, I guess).After some research I found, that 1.12.0 introduced the
--project-directory
option, so I trieddocker-compose --project-directory ./docker
from the project-root/workspace/project
as before. It doesn't appear to work either, complaining that it couldn't find a suitabledocker-compose.yml
in this directory. Presumably, this directory mentioned is falsely assumed to be/workspace/project
(=PWD
), and docker-compose fails to properly check/workspace/project/docker
as instructed (or maybe, I misunderstood the intended function of--project-directory …
, in which case the-f …
bug still applies).Using absolute paths as in
docker-compose -f /workspace/project/docker/docker-compose.yml
ordocker-compose --project-directory /workspace/project/docker
won't work either, except iffPWD=/workspace/project/docker
, which renders-f
and--project-directory
completely useless.I shall add that all mentioned paths are on the same file-system, and there are no soft-links involved.
For now, the only way to work around these problems is to
cd /workspace/project/docker
before every (parameterless)docker-compose
invocation.The text was updated successfully, but these errors were encountered: