mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 14:20:22 -07:00
Add more tests for private docker registries
This commit is contained in:
parent
ba4e9a4c82
commit
f4c1260d03
12 changed files with 294 additions and 6 deletions
|
@ -0,0 +1,40 @@
|
|||
# For versions of Nginx > 1.3.9 that include chunked transfer encoding support
|
||||
# Replace with appropriate values where necessary
|
||||
|
||||
upstream docker-registry {
|
||||
server localhost:5000;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 8080;
|
||||
server_name dockertest.ansible.com;
|
||||
|
||||
ssl on;
|
||||
ssl_certificate /etc/pki/tls/certs/dockertest.ansible.com.crt;
|
||||
ssl_certificate_key /etc/pki/tls/private/dockertest.ansible.com.key;
|
||||
|
||||
proxy_set_header Host $http_host; # required for Docker client sake
|
||||
proxy_set_header X-Real-IP $remote_addr; # pass on real client IP
|
||||
|
||||
client_max_body_size 0; # disable any limits to avoid HTTP 413 for large image uploads
|
||||
|
||||
# required to avoid HTTP 411: see Issue #1486 (https://github.com/dotcloud/docker/issues/1486)
|
||||
chunked_transfer_encoding on;
|
||||
|
||||
location / {
|
||||
# let Nginx know about our auth file
|
||||
auth_basic "Restricted";
|
||||
auth_basic_user_file /etc/nginx/docker-registry.htpasswd;
|
||||
|
||||
proxy_pass http://docker-registry;
|
||||
}
|
||||
location /_ping {
|
||||
auth_basic off;
|
||||
proxy_pass http://docker-registry;
|
||||
}
|
||||
location /v1/_ping {
|
||||
auth_basic off;
|
||||
proxy_pass http://docker-registry;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue