in the documentation there is a section about listening to a specific IP address such as "entrypoints.specificIPv4.address=192.168.2.7:8888", but unfortunately, that is not possible within docker because those IP addresses are not available inside the traefik container (obviously).
So, how can I use traefik for multiple IP addresses?
(The only other way how I was able to do that was the following:
Well, I need to bind both ips to the same port externally. Let's say I have two website, one on each IP.
1.1.1.1 -> Website 1 running on port 80
2.2.2.2 -> Website 2 running on port 80
How would I reflect this in traefik if not with the way of two entrypoints how I did?
Because I need to seperate them within traefik somehow to tell them apart.
Also my biggest problem here is that I need to map 80 (host) to 81 (traefik docker) to 81 (traefik) to 80 (docker service utilizing traefik) which seems a bit inconvienient and causes issues.
If the host has multiple ip's external and/or internal. And you only wanted traefik's ports published/bound to those ip's
In your snippet:
ports:
- "1.1.1.1:80:80"
- "2.2.2.2:80:81"
Docker would only bind 1.1.1.1:80 and 2.2.2.2:80. Any other ip on the docker host would not respond on port 80. I don't think it is really common but it is there for people to use.
Ah, okay. Well, thank you again for helping out. My main "thinking error" was that I thought I need to somehow seperate the IP's from traefik but because traefik is working on application layer and not on the network layer anyway that was of course a mistake.