2016-08-23 131 views

回答

0

你去爲

docker login your.domain.to.the.registr.without.protocol.or.port 
enter username 
enter password 

現在你可以使用拉docker pull your.domain.to.the.registr.without.protocol.or.port/youimage

確保您的註冊表中的SSL代理/終止背後運行,或者您遇到的安全問題。考慮閱讀本例https://docs.docker.com/registry/insecure/

+0

感謝您的答覆,我能夠從Docker主機做到這一點,我想用Docker Remote API來做到這一點。我正在使用API​​:https://docs.docker.com/engine/reference/api/docker_remote_api_v1.20/#/push-an-image-on-the-registry。在標題上,我設置了X-Registry-Auth及其值 - {'username':'user','password':'paasswd','email':'[email protected]','serveraddress':'server .com'}。當我這樣做時,我得到401身份驗證失敗。但是,當我使用相同的憑據時,我可以使用cli從docker主機登錄。 –