Port range for docker hosted repos

In order to make a docker registry work, you need two things:

  1. The repository has to be created (and given a port number).
  2. Provide a way for traffic from the network to reach the port created in the first step.

In an install on a regular server, creating a docker repo opens an unencrypted port on localhost. You’d then typically use nginx to “proxy” requests from the network work to the Docker repo ports (ie. network:8080 → localhost:8080). Nginx not only provides connectivity but also adds SSL - which Docker seems to need.

It’s absolutely possible to setup 10 configurations for nginx for ports in the range 8080 to 8090 (or whatever). If anyone tries to use them, nginx will give an error because it won’t be able to reach an actual service on a port that hasn’t yet got a repository created on it. You’ll need to do something similar with Kubernetes, although exactly what isn’t my speciality. Be aware though, if the thing providing connectivity performs “service checks” to make sure the service is really there, these checks will fail unless you’ve created the repos behind them. Not a problem for nginx, but may be a concern for kubernetes.