From bb69a0d32e05ac0c5bffafd5e2570d601b40e00a Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Wed, 27 May 2015 15:42:59 -0700 Subject: [PATCH] Add v1 only http endpoint Signed-off-by: Derek McGowan (github: dmcgowan) --- contrib/docker-integration/docker-compose.yml | 1 + contrib/docker-integration/install_certs.sh | 3 ++ .../docker-integration/nginx/registry.conf | 33 +++++++++++++++++++ 3 files changed, 37 insertions(+) diff --git a/contrib/docker-integration/docker-compose.yml b/contrib/docker-integration/docker-compose.yml index 06cf3396..d664c7bd 100644 --- a/contrib/docker-integration/docker-compose.yml +++ b/contrib/docker-integration/docker-compose.yml @@ -4,6 +4,7 @@ nginx: - "5000:5000" - "5001:5001" - "5002:5002" + - "5011:5011" - "5440:5440" - "5441:5441" - "5442:5442" diff --git a/contrib/docker-integration/install_certs.sh b/contrib/docker-integration/install_certs.sh index 1712e1eb..c1fa2b20 100644 --- a/contrib/docker-integration/install_certs.sh +++ b/contrib/docker-integration/install_certs.sh @@ -6,6 +6,9 @@ if [ "$hostname" = "" ]; then hostname="localhost" fi +mkdir -p /etc/docker/certs.d/$hostname:5011 +cp ./nginx/ssl/registry-ca+ca.pem /etc/docker/certs.d/$hostname:5011/ca.crt + mkdir -p /etc/docker/certs.d/$hostname:5440 cp ./nginx/ssl/registry-ca+ca.pem /etc/docker/certs.d/$hostname:5440/ca.crt diff --git a/contrib/docker-integration/nginx/registry.conf b/contrib/docker-integration/nginx/registry.conf index 16b4eeb5..b402eacb 100644 --- a/contrib/docker-integration/nginx/registry.conf +++ b/contrib/docker-integration/nginx/registry.conf @@ -66,6 +66,38 @@ server { } } +# TLS localhost (V1 Only) +server { + listen 5011; + server_name localhost; + ssl on; + ssl_certificate /etc/nginx/ssl/registry-ca+localhost-cert.pem; + ssl_certificate_key /etc/nginx/ssl/registry-ca+localhost-key.pem; + + client_max_body_size 0; + chunked_transfer_encoding on; + location / { + include docker-registry.conf; + } +} + +# TLS localregistry (V1 Only) +server { + listen 5011; + server_name localregistry; + ssl on; + ssl_certificate /etc/nginx/ssl/registry-ca+localregistry-cert.pem; + ssl_certificate_key /etc/nginx/ssl/registry-ca+localregistry-key.pem; + + client_max_body_size 0; + chunked_transfer_encoding on; + location / { + include docker-registry.conf; + } +} + + + # TLS Configuration chart # Username/Password: testuser/passpassword # | ca | client | basic | notes @@ -242,3 +274,4 @@ server { ssl_protocols SSLv3; include registry-noauth.conf; } +