Crazy lens

Docker: Mac 运行 docker-compose up -d --build 抛错 `User interaction is not allowed.`
晕死了 好好地运行容器, 突然就一直抛错bogon:2.lnmp-example admin$ docker-co...
扫描右侧二维码阅读全文
06
2020/04

Docker: Mac 运行 docker-compose up -d --build 抛错 `User interaction is not allowed.`

晕死了 好好地运行容器, 突然就一直抛错

bogon:2.lnmp-example admin$ docker-compose up -d --build 
Building nginx
Traceback (most recent call last):
  File "site-packages/dockerpycreds/store.py", line 80, in _execute
  File "subprocess.py", line 356, in check_output
  File "subprocess.py", line 438, in run
subprocess.CalledProcessError: Command '['/usr/local/bin/docker-credential-desktop', '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 _resolve_authconfig_credstore
  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-desktop exited with "error getting credentials - err: exit status 1, out: `User interaction is not allowed.`".

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "docker-compose", line 6, in <module>
  File "compose/cli/main.py", line 71, in main
  File "compose/cli/main.py", line 127, in perform_command
  File "compose/cli/main.py", line 1085, in up
  File "compose/cli/main.py", line 1081, in up
  File "compose/project.py", line 527, in up
  File "compose/service.py", line 344, in ensure_image_exists
  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 _set_auth_headers
  File "site-packages/docker/auth.py", line 304, in get_all_credentials
  File "site-packages/docker/auth.py", line 281, in _resolve_authconfig_credstore
docker.errors.DockerException: Credentials store error: StoreError('Credentials store docker-credential-desktop exited with "error getting credentials - err: exit status 1, out: `User interaction is not allowed.`".',)
[88967] Failed to execute script docker-compose

百度找了下原因:

Docker 默认设置,将Docker登录安全地存储在MacOS密钥链中造成的,取消这个设置就可以解决,具体细节请自行谷歌。

解决:

依次点击 :Docker 图标 >> Preference >> General
取消勾选 Securely store Docker logins in macOS keychian,
docker.png
重新运行 docker-compose up ,问题解决。

最后修改:2020 年 04 月 06 日 07 : 14 PM
如果觉得我的文章对你有用,请随意赞赏

发表评论