I want to run rancherserver in a container on the host.
It works when I set CATTLE_AGENT_IP to <HOST_IP>, however after some time it resets to docker bridge IP. What can I do to avoid this reset?
See below the corresponding FAQ entry:
Are the IPs of the hosts correct in the UI?
Every so often, the IP of the host will accidentally pick up the docker bridge IP instead of the actual IP. These are typically 172.17.42.1 or starting with 172.17.x.x. If this is the case, you need to re-register your host with the correct IP by explicitly setting the CATTLE_AGENT_IP environment variable in the docker run command.
$ sudo docker run -d -e CATTLE_AGENT_IP=<HOST_IP> --privileged