Description
Checklist
- Have you pulled and found the error with
jc21/nginx-proxy-manager:latest
docker image?- Yes
- Are you sure you're not using someone else's docker image?
- Yes
- Have you searched for similar issues (both open and closed)?
- Yes
Describe the bug
I'm spending hours and days trying to figure out what's wrong with this setup. Based on my understanding of Docker, when creating an internal network, containers should be able to communicate using DNS names. And in fact, they do — from inside Nginx Proxy Manager I can reach the other container. But the proxy host keeps giving me a bad gateway. Proxy works only when using the container's IP address.
Tested with different containers: homeassistant, portainer, filebrowser, healthchecks. All works fine with Ip address.
- Create the internal network:
docker network create internal --internal
- Spin a NPM container with the default bridge network
- Add the internal network:
docker network connect internal nginx-proxy-manager
- Run a simple container like filebrowser with the
internal
network only (do not expose port, isolate it) - Create a proxy host to
filebrowser:80
, that is using container DNS
Container filebrowser networking (relevant part):
"NetworkSettings": {
"Bridge": "",
"Networks": {
"internal": {
"IPAddress": "172.19.0.4",
"DNSNames": [
"filebrowser",
"d2099f13c0b0"
]
}
}
}
Container nginx-proxy-manager networking (relevant part):
"Networks": {
"external": {
"Gateway": "172.20.0.1",
"IPAddress": "172.20.0.2",
"DNSNames": [
"nginx-proxy-manager",
"603c8bc176a1"
]
},
"internal": {
"IPAddress": "172.19.0.3",
"DNSNames": [
"nginx-proxy-manager",
"603c8bc176a1"
]
}
}
From inside the container curl -v http://filebrowser
show the HTML page.
Nginx Proxy Manager Version
v2.12.3
Expected behavior
Should proxy requests using container’s DNS name.
Operating System
RaspberryPi 4B running Raspberry os-lite