-
Notifications
You must be signed in to change notification settings - Fork 93
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
Unable to access Container Registry images despite running docker-credential-gcr configure-docker
using docker-compose in Container Optimized OS
#10
Comments
Because the It is currently:
|
docker-credential-gcr configure-docker
docker-credential-gcr configure-docker
using docker-compose in Container Optimized OS
I'm currently in Copenhagen (taking some vacation after DockerCon), but I believe the issue may be that ~/.docker/config.json needs to be in a volume which is shared between docker-credential-gcr, docker-compose, and docker itself. Does adding something like |
Thanks for the reply. (I did remember to source my Not sure how popular docker-compose is right now, but it would be much much less painful to have it natively installed, or some kind of opt-in... |
Ok. I'll look into it in more depth when I'm back home (next week). Until then, you could try removing docker-credential-gcr from your docker config, setting an environment variable like $GCPTOKEN containing your access token: https://cloud.google.com/container-registry/docs/advanced-authentication
and logging in manually, e.g.:
`docker login -u _token -p $GCPTOKEN https://gcr.io`
…________________________________
From: Jonathan ES Lin <[email protected]>
Sent: Sunday, October 22, 2017 4:11:07 PM
To: GoogleCloudPlatform/docker-credential-gcr
Cc: Jake Sanders; Comment
Subject: Re: [GoogleCloudPlatform/docker-credential-gcr] Unable to access Container Registry images despite running `docker-credential-gcr configure-docker` using docker-compose in Container Optimized OS (#10)
Thanks for the reply. -v "$HOME/.docker:$HOME/.docker does not seem to work. In fact, $PWD is my $HOME directory in the server. -v "$HOME:$HOME also did not work.
(I did remember to source my ~/.bashrc :))
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#10 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ABJSvchvk2FhI7gCiIbOYj5nufreILsdks5su0z7gaJpZM4P8UXy>.
|
|
I've the the same issue on Windows using Docker Toolbox. Steps to reproduce:
After this, I'm able to
|
I'm having the exact same issue as well. Although inconvenient, I'm running |
This might have to do with the difference between running it as your user, or having root run it. The Google Container Optimized OS has |
I had the same issue as OP, I ended up with:
Make sure the machine has access to jq. I'm not sure if this is a recommended or secure practice, but its working for me. |
Is this still a known issue here? I failed to pull images from gcr when using docker-compose build. docker-compose version 1.11.2, build dfed245 |
@astleychen on COS specifically? This might be what's going on: https://stackoverflow.com/questions/51236449 |
I'm on COS and also had similar problems. The documentation for COS makes it seem like it should be as simple as running 2 commands.
The file gets created in After bashing my head against the wall for most of the day I tried the login command |
When I run the example from @syhol I get a better error message. It looks like
|
I managed to crack the case! I needed to use the
|
I managed to find https://cloud.google.com/container-optimized-os/docs/how-to/run-container-instance#starting_a_docker_container_via_cloud-config which describes how to run the service as
|
I've been doing a The following script will automate that:
|
Did anyone try - Worked for me, I feel my kubectl setup deleted the creds. |
You can use a docker-compose container with docker-credential-gcr added to it, ala: https://hub.docker.com/r/cryptopants/docker-compose-gcr It's a drop-in replacement for the containerized docker-compose suggested by COS docs, and can pull from private gcr.io seamlessly.
|
the problem is Python 3 is not supported by the Google Cloud SDK. we need to use python 2 |
I am running Google's container optimized OS, with the
docker-compose
tool as documented by https://cloud.google.com/community/tutorials/docker-compose-on-container-optimized-os (docker-compose runs in a container, accessed by an alias)I am getting the issue referenced here: docker/compose#4885, that is supposedly resolved.
I have already run the initialization command:
docker-credential-gcr configure-docker
However, as per my comment there (docker/compose#4885 (comment)), I am unable to pull in container registry's images via the aforementioned
docker-compose
alias.docker pull gcr.io/PROJECT_ID/IMAGE
works though.Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: