3

I use Google Cloud Registry, which adds "auths" and "credHelpers" keys to my ~/.docker/config.json.

The problem I have is that when I'm offline, or just building locally, it tries to connect to each hostname, which either fails (when offline) or is really slow (when online).

How can I tell docker-compose to not use these credentials/hosts when building?

My workaround now is to delete the properties from the ~/.docker/config.json, and then gcloud auth configure-docker each time, but I'd rather not have to keep authenticating to push when I do want to use GCR.

ocker.api.build._set_auth_headers: Looking for auth config
docker.auth._resolve_authconfig_credstore: Looking for auth entry for 'https://asia.gcr.io'
docker.auth._resolve_authconfig_credstore: Looking for auth entry for 'https://eu.gcr.io'
docker.auth._resolve_authconfig_credstore: Looking for auth entry for 'https://gcr.io'
docker.auth._resolve_authconfig_credstore: Looking for auth entry for 'https://marketplace.gcr.io'
docker.auth._resolve_authconfig_credstore: Looking for auth entry for 'https://staging-k8s.gcr.io'
docker.auth._resolve_authconfig_credstore: Looking for auth entry for 'https://us.gcr.io'
docker.auth._resolve_authconfig_credstore: Looking for auth entry for 'gcr.io'
docker.auth._resolve_authconfig_credstore: Looking for auth entry for 'us.gcr.io'
d-_-b
  • 21,536
  • 40
  • 150
  • 256

0 Answers0