启动 docker 容器导致 docker-credential-secretservice: The connection is closed

Starting docker container results in docker-credential-secretservice: The connection is closed

我正在尝试从本教程(快速安装和教程)启动 docker 容器:https://zuul-ci.org/docs/zuul/admin/quick-start.html#start-zuul-containers

WARNING: The no_proxy variable is not set. Defaulting to a blank string.
WARNING: The http_proxy variable is not set. Defaulting to a blank string.
Building node
Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 11, in <module>
    load_entry_point('docker-compose==1.17.1', 'console_scripts', 'docker-compose')()
  File "/usr/lib/python2.7/dist-packages/compose/cli/main.py", line 68, in main
    command()
  File "/usr/lib/python2.7/dist-packages/compose/cli/main.py", line 121, in perform_command
    handler(command, command_options)
  File "/usr/lib/python2.7/dist-packages/compose/cli/main.py", line 952, in up
    start=not no_start
  File "/usr/lib/python2.7/dist-packages/compose/project.py", line 431, in up
    svc.ensure_image_exists(do_build=do_build)
  File "/usr/lib/python2.7/dist-packages/compose/service.py", line 318, in ensure_image_exists
    self.build()
  File "/usr/lib/python2.7/dist-packages/compose/service.py", line 923, in build
    shmsize=parse_bytes(build_opts.get('shm_size')) if build_opts.get('shm_size') else None,
  File "/usr/lib/python2.7/dist-packages/docker/api/build.py", line 238, in build
    self._set_auth_headers(headers)
  File "/usr/lib/python2.7/dist-packages/docker/api/build.py", line 285, in _set_auth_headers
    self._auth_configs, registry
  File "/usr/lib/python2.7/dist-packages/docker/auth.py", line 97, in resolve_authconfig
    authconfig, registry, store_name
  File "/usr/lib/python2.7/dist-packages/docker/auth.py", line 142, in _resolve_authconfig_credstore
    'Credentials store error: {0}'.format(repr(e))
docker.errors.DockerException: Credentials store error: StoreError('Credentials store docker-credential-secretservice exited with "The connection is closed".',)

什么可能导致此错误?解决方案是什么?

我尝试重新安装 docker-compose & docker.io,但没有成功。

谢谢。

我不能称之为真正的解决方案,但它帮助我摆脱了这个问题并启动了容器。

步骤是:

  1. ~/.docker/config.json 中删除行 "credsStore":"secretservice"
  2. cd zuul/doc/source/admin/examples
  3. sudo -E docker-compose up

容器现在应该启动了。

感谢分享伊万。不过,我必须在您的解决方案之前执行 docker login,因为我的 ~/.docker/.docker 目录中没有 config.json 文件。