Reputation: 19388
I have the following
a virtual docker repo docker-virtual
a remote docker repo dockerhub
a local docker repo docker-local
docker-local is the default deployment repo. Can I use a multidomain certificate to configure the virtual repo in my reverse proxy?
Does the certificate need to support the local repo?
Upvotes: 0
Views: 139
Reputation: 621
"Does the certificate need to support the local repo?"
Not really, as long as you are using the Default Deployment Repository feature of your Virtual docker repository in Artifactory, you only have to use one registry endpoint with the client for pushing and pulling images.
Wildcard certificates are good if you are going to work with more than just one registry endpoint. For example, consider this Nginx configuration snippet and the "server_name" directive specifically:
server {
listen 443 ssl;
listen 80 ;
server_name ~(?<repo>.+)\.art-prod.com art-prod;
...
rewrite ^/(v1|v2)/(.*) /artifactory/api/docker/$repo/$1/$2;
...
}
The regular expression here should capture the sub-domain portion of the URL, which would make it available for use later when re-writing the URL from "/v2/' to the full URI of the Artifactory API that includes the actual repository name. In this case your configuration will be handling more than just one hostname, so it'll be best if you used a wildcard certificate for *.art-prod.com.
Upvotes: 1