After following the setup instructions for the Artifact Registry in the gcloud CLI, whenever I use docker-compose and I try to fetch an image from a registry, this stack trace appears:
Pulling **** (europe-west2-docker.pkg.dev/****/****/****:latest)...
ERROR: gcloud failed to load: /tmp/_MEIsEW5sl/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by /usr/lib/python3.8/lib-dynload/_ssl.cpython-38-x86_64-linux-gnu.so)
gcloud_main = _import_gcloud_main()
import googlecloudsdk.gcloud_main
from googlecloudsdk.calliope import base
from googlecloudsdk.calliope import arg_parsers
from googlecloudsdk.core import log
from googlecloudsdk.core import properties
from googlecloudsdk.core import config
from oauth2client import client
from oauth2client import transport
import httplib2
from httplib2.python3.httplib2 import *
import ssl
import _ssl # if we can't import it, let the error propagate
This usually indicates corruption in your gcloud installation or problems with your Python interpreter.
Please verify that the following is the path to a working Python 2.7 or 3.5+ executable:
/usr/bin/python3
If it is not, please set the CLOUDSDK_PYTHON environment variable to point to a working Python 2.7 or 3.5+ executable.
If you are still experiencing problems, please reinstall the Cloud SDK using the instructions here:
https://cloud.google.com/sdk/
Traceback (most recent call last):
File "docker/credentials/store.py", line 80, in _execute
File "subprocess.py", line 411, in check_output
File "subprocess.py", line 512, in run
subprocess.CalledProcessError: Command '['/usr/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 "docker/auth.py", line 264, in _resolve_authconfig_credstore
File "docker/credentials/store.py", line 35, in get
File "docker/credentials/store.py", line 93, in _execute
docker.credentials.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 3, in <module>
File "compose/cli/main.py", line 67, in main
File "compose/cli/main.py", line 126, in perform_command
File "compose/cli/main.py", line 1070, in up
File "compose/cli/main.py", line 1066, in up
File "compose/project.py", line 615, in up
File "compose/service.py", line 356, in ensure_image_exists
File "compose/service.py", line 1267, in pull
File "compose/progress_stream.py", line 99, in get_digest_from_pull
File "compose/service.py", line 1234, in _do_pull
File "docker/api/image.py", line 396, in pull
File "docker/auth.py", line 48, in get_config_header
File "docker/auth.py", line 324, in resolve_authconfig
File "docker/auth.py", line 235, in resolve_authconfig
File "docker/auth.py", line 281, in _resolve_authconfig_credstore
docker.errors.DockerException: Credentials store error: StoreError('Credentials store docker-credential-gcloud exited with "".')
[14339] Failed to execute script docker-compose
I honestly can't understand what is going wrong there. I'm using Ubuntu 20.04 LTS. My system has OpenSSL 1.1.1f installed.
This fixes the issue for Python 3:
export LD_LIBRARY_PATH=/usr/local/lib
There is a detailed explanation in this upstream comment on why the resolved LD_LIBRARY_PATH
is incorrect and needs changing.
So, there is a issue in docker-compose that gives some solutions to this problem. It seems that a Google Cloud SDK update broke the fix that the docker team had issued. A temporary solution given here fixed my issue:
export CLOUDSDK_PYTHON=python2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With