2016-08-23 136 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主机登录。 –