Docker Index Nginx
The purpose of this repository is to provide automated builds of the ekristen/docker-index-nginx reverse proxy for quickly setting up a Private Docker Index + Registry setup.
Reverse Nginx Proxy for a Private Docker Index + Registry Setup
License: MIT License
The purpose of this repository is to provide automated builds of the ekristen/docker-index-nginx reverse proxy for quickly setting up a Private Docker Index + Registry setup.
Good day,
the proxy configurations as below, I note that this configuration: "location /"
server {
listen *:443;
server_name registry;
ssl on;
ssl_certificate /etc/nginx/ssl/certificate.crt;
ssl_certificate_key /etc/nginx/ssl/private.key;
client_max_body_size 0;
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
location / {
proxy_pass http://registry;
}
}
server {
listen *:443;
server_name index;
ssl on;
ssl_certificate /etc/nginx/ssl/certificate.crt;
ssl_certificate_key /etc/nginx/ssl/private.key;
client_max_body_size 0;
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
location / {
proxy_pass http://index;
}
}
does it mean when the access url is https://xxx.xxx.xxx/ will always proxy to http://registy priorly.
because both server registry and index are all the same proxy-url "location /" , and server registry is at the prior position in the config file.
after fig up the containers, I tried to "docker login https://xxxx.xxx.xxx" , it was failed:
Username: admin
Password:
Email: [email protected]
FATA[0015] Error response from daemon:
Then I tried to run "docker logs <registry_container_id> " to check the logs on registry container, I found this log:
10.0.0.41 - - [22/Apr/2015:02:15:12 +0000] "POST /v1/users/ HTTP/1.0" 404 233 "-" "Go 1.1 package http"
10.0.0.41 is the nginx container IP, this type of log ("..... POST /v1/users/ .....") means it POST the requst to registry container, right ?
should not nginx proxy send the request to index container ? docker-index container is the right one to deal with this type of request.
Does the nginx proxy configuring "location /" resulted that ?
anyont encountered this issue ?
thanks a lot.
hi,
the docker-index-nginx image will inject 2 variables in run.sh :
$REGISTRY_PORT_5000_TCP_ADDR
$INDEX_PORT_5100_TCP_ADDR
the registry and index container IP will be given to be the values of them.
just wanna know how to give the values of container's IP to them when fig up ?
which codes do that ?
only know $REGISTRY_HOSTNAME and $INDEX_HOSTNAME are exported in fig.yml:
environment:
- INDEX_HOSTNAME=index.private.io
- REGISTRY_HOSTNAME=registry.private.io
thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.