亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

使用 python docker sdk 登錄到 ecr 注冊表無法按預期工作

使用 python docker sdk 登錄到 ecr 注冊表無法按預期工作

呼喚遠方 2021-07-08 14:11:44
假設我已經在名為 creds 的對象中從 boto 獲得了 ecr 憑據,當我這樣做時:client = from_env()client.login(creds.username, password=creds.password, registry=creds.endpoint)我得到:{u'IdentityToken': u'', u'Status': u'Login Succeeded'}到目前為止很棒!我檢查:client.api.__dict__我得到:{'_auth_configs': {'auths': {'registry_i_just_logged_into': {'email': None,'password': 'xxxxxxxxxxxxx','serveraddress': 'registry_i_just_logged_into','username': 'xxxxxxx'},u'some_other_registry': {},'credsStore': u'osxkeychain'}.... (etc, etc)到目前為止,還不錯。但是當我這樣做時:client.images.pull("registry_i_just_logged_into/some_repo", tag="latest")或者當我這樣做時(從命令行):docker pull registry_i_just_logged_into/some_repo:latest我總是得到:Error response from daemon: pull access denied for some_repo, repository does not exist or may require 'docker login'盡管如此,如果我這樣做(使用我用來登錄的相同用戶名和密碼):client.images.pull("registry_i_just_logged_into/some_repo", tag="latest", auth_config={'username': creds.username, 'password': creds.password})它沒有問題。所以我假設這是解決要使用哪個注冊表的順序的問題,但如果密鑰已經存在于 _auth_configs 中,docker sdk 似乎應該處理這個問題。我究竟做錯了什么?
查看完整描述

2 回答

  • 2 回答
  • 0 關注
  • 181 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號