When deploy a private registry per this docker instructions, I have to specify the port in CLI to push the image like this:
For http(80
), the command is: docker push host.com:80/alpine
.
For https(443
), the command has to be: docker push host.com:443/alpine
.
If I mapped the port to 5000, the command is: docker push host.com:5000/alpine
.
The desired effect is a simple push like this:
docker push host.com/alpine
How do I construct the docker run
full command to achieve this when I start registry-container?
Default port is 443, as far as I know, it can't be changed. But you can setup NGINX(or HAProxy) on another host and configure it to proxy all your requests to your registry, something like this:
server {
listen *:443 ssl;
server_name registry.company.com;
proxy_set_header Host upload.expert;
location / {
proxy_pass http://private.registry.company.com:5000;
}
}
And then just docker push registry.company.com/alpine
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With