Low port with docker fails on most systems.
Problem
Currently there is no good way to have the Docker image running on a low port. This is due to a mix of reasons:
- The unprivileged user inside docker cannot open low ports such as 80 or 443, so the image should run on high ports. This is the default now (10080 and 10443).
- Port forwarding via Docker (443 -> 10443 etc.) works, but...
- When the user requests http://...:80, the server sends a
301 Redirect
response, including the port for the encrypted connection. By default this is 10443, which is correct inside the Docker environment, but of course wrong outside.
- When the user requests http://...:80, the server sends a
Proposed solution
The server should be configurable to redirect to an arbitrary port. Maybe with an additional server config option, that would then be set automatically by the Docker script.