简体   繁体   English

将Docker存储库配置为工件中的子域

[英]Configuring a docker repository as a subdomain in artifactory

We are trying to set up a docker repository within artifactory version 4.11.1, following is the set up 我们正在尝试在人工版本4.11.1中设置docker存储库,以下是设置

-- Created a local docker repo - docker-local
-- Created a virtual dokcer repo - docker-virtual
-- Created a remote docker repo - docker-hub
-- Configured docker-local to be the default deployment repo

We are using a multidomain certificate that supports reverse-proxy.company.com and docker-virtual.reverse-proxy.company.com 我们使用的多域证书支持reverse-proxy.company.com和docker-virtual.reverse-proxy.company.com

The question is Should the nginx configuration be set to the following 问题是应将nginx配置设置为以下内容

server {
listen 80;
listen 443;
server_name docker-virtual.reverse-proxy.company.com reverse-proxy.company.com;
 ..... other confug

}

With this set up I expect the lients to connect to the virtual repo 通过此设置,我希望留置权连接到虚拟仓库

docker push docker-virtual.reverse-proxy.company.com/<my-image>

Is this a valid set up? 这是有效的设置吗? Note that we dont have a wildcard certificate and its not an option. 请注意,我们没有通配符证书,这不是一个选择。 Does the multidomain certificate need to support the default deployment directory as well? 多域证书是否还需要支持默认的部署目录?

So you can do it that way by having multiple servername statements instead of the wildcard, and then using our wild-card rewrite rule as-is as you suggested. 因此,您可以通过使用多个servername语句(而不是通配符)来实现此目的,然后按照您的建议原样使用我们的通配符重写规则。 There is no need to support anything other than the docker-virtual.reverse-proxy.company.com and the reverse-proxy.company.com as the forward from docker-virtual to the local is internal to artifactory. 除了docker-virtual.reverse-proxy.company.com和reverse-proxy.company.com之外,不需要支持任何其他内容,因为从docker-virtual到本地的转发是内部的。

You could also have separate server statements, which would make it easier to have single domain certs separately. 您也可以使用单独的服务器语句,这样可以更轻松地单独拥有单个域证书。 The docker one would then be: 码头工人将是:

server {
listen 443;  //docker is ssl only
server_name docker-virtual.reverse-proxy.company.com;
 ..... other confug

}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM