Openshift: get access to openshift docker registry

大兔子大兔子 提交于 2019-12-13 05:11:18

问题


I've exposed my openshift registry:

$ oc get routes -n default
NAME              HOST/PORT                                       PATH      SERVICES          PORT       TERMINATION   WILDCARD
docker-registry   docker-registry-default.192.168.99.104.nip.io             docker-registry   5000-tcp                 None

Nevertheless, I'm trying to get access on that registry, but I've not been able to figure out what's wrong:

docker login -p ngRslZJYJ40WxBA6YQbE5nMDK1Gh-cSWgnJCKR4EJ2I docker-registry-default.192.168.99.104.nip.io -u unused

This command keeps stuck.


回答1:


If the route is configured with HTTPS and the cert is a self-signed cert then docker has to be configured to trust the cert.

Steps:

  • On the host where docker is running, create a folder under /etc/docker/certs.d/ named after the OpenShift Docker Registry URL: mkdir -p /etc/docker/certs.d/docker-registry-default.192.168.99.104.nip.io
  • Place in that folder the cert of the CA that signed the cert of the OpenShift Docker Registry: /etc/docker/certs.d/docker-registry-default.192.168.99.104.nip.io/ca.crt


来源:https://stackoverflow.com/questions/51045704/openshift-get-access-to-openshift-docker-registry

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!