Proxying container exposing multiple ports (but only one HTTP)
See original GitHub issueI’m trying to proxy a gitea container, which is exposing one SSH port and one HTTP port.
The README states:
If your container exposes multiple ports, nginx-proxy will default to the service running on port 80. If you need to specify a different port, you can set a VIRTUAL_PORT env var to select a different one. If your container only exposes one port and it has a VIRTUAL_HOST env var set, that port will be selected.
However even though I have set VIRTUAL_PORT to the exposed HTTP port, the service is marked as “down” in the generated default.conf of nginx:
server 172.17.0.11 down;
If I only expose the HTTP port the generator works as expected.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:5
Top Results From Across the Web
Proxying container exposing multiple ports (but only one HTTP)
I'm trying to proxy a gitea container, which is exposing one SSH port and one HTTP port. The README states: If your container...
Read more >How to Expose Multiple Containers On the Same Port - iximiuz
So the docker-proxy is not fully useless. Docker publishes container port on the host. The problem with the above DNAT is that it...
Read more >How to use multiple containers with same port and without ...
Hi there, I have two container images foo and bar that both expose port 80. I want to run them in the same...
Read more >traefik - multiple port bindings for the same host V2
Since the whoami app only exposes port 80 itself and TLS is terminated at traefik this is defined as port 80 for both...
Read more >running two containers needing the same port : r/docker - Reddit
Multiple containers need port 80 too and normally I would just ... For non-HTTP/S workloads, this may be necessary, but a reverse proxy...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have the same problem. I would like to run a gitea container behind the proxy. Running the gitea frontend is no problem with the config below. But the ssh port for git is not accessible through the gitea domain with this config.
The question is, how to add the port 22 to be exposed by the proxy, too?
Here’s my
docker-compose
fileEdit: with this config gitea frontend is exposed under
code.example.de
and ssh under host port 2222I’m facing the same issue with phabricator docker-compose.