Docker Community Forums

Share and learn in the Docker community.

How to configure port 80 for private registry while port 80 is using by rancher k8s

Hello everyone,

Currently I have a private registry using port 5000 but I need to configure it to use port 80 for some reason. Does anyone know how to do it while the port 80 is using by rancher k8s. I tried to setup proxy registry but it didn’t work as the port 80 is occupied by the rancher k8s UI.

Thanks.

Good evening,

this problem is not a Docker-problem - it is a general problem:
how should the computer decide which service should receive a request sent to destination port :80? To your registry or to the k8s-UI?

You can either move the k8s-UI to a different port (if you need your registry on port :80) to have port :80 available for your registry.

Or you can use a loadbalancer (i.e. traefik) listening on port 80 and distributing the requests to the two backend-services/containers based on some rules (hostname, path, …).

I am using the latter approach to have a private registry and multiple NginX- + NodeJS-containers all accessible on port :80 and :443 and traefik decides where to send the requests to based on the path (in my case /v2/ to the registry, /barcodes/ to the corresponding NodeJS-container, … and the rest to a NginX-container).

Best regards
Matthias