I try to follow this instruction Authenticate proxy with nginx | Docker Documentation for build docker registry with SSL but failed - “X509: certificate signed by unknown authority”.
Than I try to build Docker Registry without SSL.
This is my Nginx.config
http {
upstream docker-registry {
server registry:5000;
}
map $upstream_http_docker_distribution_api_version $docker_distribution_api_version {
'' 'registry/2.0';
}
server {
listen 80;
server_name registry.XXX.io;
client_max_body_size 0;
chunked_transfer_encoding on;
location /v2/ {
if ($http_user_agent ~ "^(docker\/1\.(3|4|5(?!\.[0-9]-dev))|Go ).*$" ) {
return 404;
}
auth_basic "Registry realm";
auth_basic_user_file /etc/nginx/conf.d/nginx.htpasswd;
add_header 'Docker-Distribution-Api-Version' $docker_distribution_api_version always;
proxy_pass http://docker-registry;
proxy_set_header Host $http_host; # required for docker client's sake
proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 900;
}
}
}
and this is my compose file
nginx:
image: "nginx:alpine"
ports:
- 5000:80
links:
- registry:registry
volumes:
- ./auth:/etc/nginx/conf.d
- ./auth/nginx.conf:/etc/nginx/nginx.conf:ro
registry:
image: registry:latest
volumes:
- ./registry-data:/var/lib/registry
I start docker registry on fly without additional parameters
sudo docker-compose -f registry-compose.yml up -d
And when I check my authentication
sudo docker login -u=registry http://registry.XXXX.io:80
I receive unexpected result
Error response from daemon: Get https://registry.XXXX.io:80/v2/: dial tcp yyy.yyy.yyy.yyy:80: connect: connection refused
So, where is SSL and httpS defined? I do not define httpS and SSL at all. What I need to change to full avoid SSL and httpS?