假設我已經在名為 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 似乎應該處理這個問題。我究竟做錯了什么?
添加回答
舉報
0/150
提交
取消