If I used docker as provider, I can define
loanbalancer port with label as below
As you can see I don't need to know what internal service ip address is. However with file provider, it appears that I must put the private ip address next to url.
## Dynamic configuration
- url: "http://private-ip-server-1/"
I know I can inspect the container to check its IP address, is there any quicker way to find the internal IP?
I do find a quicker way accidentally... Let me share it with you guys.
on your static configurations, add Docker as another provider
After that, after you've started a new docker service, you can see a this docker service available on your Traefik dashboard and you can get the internal ip address there.
If you know any good methods of getting the internal ip address, please let me know.
I can't think of a good reason to do this. It's precisely why the dynamic providers exist.
The ip is unlikely to be addressable outside of the docker host and docker networks.
Unless you are doing ip configuration for your container(in which case you know the ip) the ip is almost certainly going to change when you change the container.
Can you please confirm the correct way of getting the IP of a container/service is to use docker inspect, is that right?