Require authentication for writes to the registry
Some checks are pending
Some checks are pending
This commit is contained in:
parent
2a383d166f
commit
88b07e2930
2 changed files with 6 additions and 4 deletions
|
@ -1,11 +1,8 @@
|
||||||
services:
|
services:
|
||||||
registry:
|
registry:
|
||||||
image: registry:2
|
image: registry:2
|
||||||
ports:
|
|
||||||
- "5000:5000"
|
|
||||||
volumes:
|
volumes:
|
||||||
- /opt/APP_NAME/registry/config.yml:/etc/docker/registry/config.yml:ro
|
- /opt/APP_NAME/registry/config.yml:/etc/docker/registry/config.yml:ro
|
||||||
- /etc/registry/auth/auth.htpasswd:/etc/docker/registry/auth/auth.htpasswd:ro
|
|
||||||
- /etc/ssl/registry/registry.crt:/etc/docker/registry/ssl/registry.crt:ro
|
- /etc/ssl/registry/registry.crt:/etc/docker/registry/ssl/registry.crt:ro
|
||||||
- /etc/ssl/registry/registry.key:/etc/docker/registry/ssl/registry.key:ro
|
- /etc/ssl/registry/registry.key:/etc/docker/registry/ssl/registry.key:ro
|
||||||
- registry_data:/var/lib/registry
|
- registry_data:/var/lib/registry
|
||||||
|
|
|
@ -20,8 +20,13 @@ http {
|
||||||
ssl_protocols TLSv1.2 TLSv1.3;
|
ssl_protocols TLSv1.2 TLSv1.3;
|
||||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||||
|
|
||||||
# Public access for all registry API requests (temporary for testing)
|
# Public read access for all GET requests to registry API
|
||||||
location /v2/ {
|
location /v2/ {
|
||||||
|
limit_except GET {
|
||||||
|
auth_basic "Registry Realm";
|
||||||
|
auth_basic_user_file /etc/nginx/auth/auth.htpasswd;
|
||||||
|
}
|
||||||
|
|
||||||
proxy_pass https://registry_api;
|
proxy_pass https://registry_api;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
|
Loading…
Add table
Reference in a new issue