首页 > 解决方案 > Do I need to add HTTPS registries to Docker daemon?

问题描述

I am using private Docker registries for my CI/CD pipeline. These are Docker repositories in my Nexus (NXRM) instance.
Until recently, those repos only had HTTP connectors but after upgrading NXRM (I believe it's supported since 3.18.0), it seems possible to add HTTPS connectors to them. So I tried to add support for both protocols in one of my repos:

HTTP and HTTPS connectors setup for Nexus Docker repos

Upon reading Docker docs it is my understanding that only insecure registries should be declared in the Docker Daemon, but maybe I got that wrong. I tried to figure it out by myself by attempting logins to my registry both with and without the IP address declared in the daemon, but I got 503 Service unavailable both times. I must have an issue elsewhere (working on it right now), so I can't know for sure. Maybe I can't have both connectors enabled at the same time, that's the next lead I'll follow.

Do I need to declare my Docker registries that support HTTPS in the daemon in order to be able to log in?

标签: dockerhttpsdocker-composenexus

解决方案


是的,您可以同时使用 HTTP 和 HTTPS 连接器,因为它们使用不同的连接端口。是否必须在守护进程中声明注册表取决于您的证书 - 不安全的注册表是使用自签名证书的注册表。


推荐阅读