-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Compose Cannot Use docker-credential-gcloud on Windows #5875
Comments
I got it to work by changing "gcloud" to "gcloud.cmd" in this section:
|
@wwadge That worked for me, thanks for the workaround. I guess this means it's a Python limitation in subprocess.Popen here? https://github.com/shin-/dockerpy-creds/blob/master/dockerpycreds/store.py#L66 |
No it's simpler than that: "Credential helpers are specified in a similar way to credsStore, but allow for multiple helpers to be configured at a time. Keys specify the registry domain, and values specify the suffix of the program to use (i.e. everything after docker-credential-)." the binary on disk is simply called docker-credential-gcloud.cmd instead of docker-credential-gcloud as it was setup by gcloud command (as it would be under linux probably). This is therefore a gcloud sdk bug in my opinion. |
I'm not certain that I agree, since specifying "gcloud" is completely functional with the "docker pull" command, and only fails with docker-compose. The main docker command on Windows is apparently transparently applying the .cmd suffix, which is resulting in a difference in behavior between docker and docker-compose. This difference may be either intentional or an incidental result of the way the subprocess is launched by the docker command line. However, I feel like the behavior should be synchronized between the two. |
Same issue here on Win10 Fall Creators Update with Docker 18.03. Changing "gcloud" to "gcloud.cmd" fixed the issue for me as well, thanks @wwadge! |
Yeah, ideally the credstore resolution would work the same on Compose as it does with the Docker CLI. I'll see what I can do to fix it 👍 thanks for the reports |
Thanks for the fix @shin- ! |
It's 2021, and this is still occuring on the latest versions of everything. |
this fix still works. Shame it doesn't just work but I'll take it. |
Description of the issue
When using the gcloud credential helper on Docker for Windows, docker pull commands authenticate and succeed without problems. However, docker-compose pull or similar commands that trigger a pull will fail with file not found errors related to docker-credential-gcloud. This has been replicated across several systems.
Context information (for bug reports)
Steps to reproduce the issue
gcloud auth configure-docker
to setup the helpers in config.json (per https://cloud.google.com/sdk/gcloud/reference/auth/configure-docker)docker-compose pull
using a docker-compose.yaml that pulls from a private GCR registryObserved result
Pulling images from GCR fails with a low-level exception. However, docker pull commands work fine.
Expected result
Authentication using docker-credential-gcloud should succeed.
Stacktrace / full error message
Additional information
Windows 10 Fall Creators Update 1709 or Version Next 1803, running Docker for Windows 18.03 (no special installation steps)
We also tried downloading the latest docker-compose, 1.21.0, and overwriting the installed version. Same results.
The text was updated successfully, but these errors were encountered: