The current build process for writeup.ai and betterself.io is :
That works 99% of the time. Sometimes, I will want to debug something on the instance/VM itself that's when I receive cryptic errors from docker-credential-gcloud ...
subprocess.CalledProcessError: Command '['/usr/local/bin/docker-credential-gcloud', 'get']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "site-packages/docker/auth.py", line 264, in _resolveauthconfigcredstore File "site-packages/dockerpycreds/store.py", line 35, in get File "site-packages/dockerpycreds/store.py", line 93, in _execute dockerpycreds.errors.StoreError: Credentials store docker-credential-gcloud exited with "".
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "bin/docker-compose", line 6, in
File "compose/cli/main.py", line 71, in main File "compose/cli/main.py", line 127, in performcommand File "compose/cli/main.py", line 287, in build File "compose/project.py", line 386, in build File "compose/project.py", line 368, in buildservice File "compose/service.py", line 1084, in build File "site-packages/docker/api/build.py", line 260, in build File "site-packages/docker/api/build.py", line 307, in _setauthheaders File "site-packages/docker/auth.py", line 310, in getallcredentials File "site-packages/docker/auth.py", line 281, in _resolveauthconfigcredstore docker.errors.DockerException: Credentials store error: StoreError('Credentials store docker-credential-gcloud exited with "".',)
This is a slightly odd scenario, but if you get this error, the fix is to edit
~/.docker/config.json
and then change everything that says "gcloud" to "gcr"
{
"auths": {},
"credHelpers": {
"gcr.io": "gcr",
"us.gcr.io": "gcr",
"eu.gcr.io": "gcr",
"asia.gcr.io": "gcr",
"staging-k8s.gcr.io": "gcr",
"marketplace.gcr.io": "gcr"
}
}
You can replace gcloud -> gcr with the command below.
sed -i -e 's/gcloud/gcr/g' ~/.docker/config.json