Docker Community Forums

Share and learn in the Docker community.

Change of Docker Host IP


(Gerdogdu) #1

We restart docker machine and change its host IP. But then UCP not working any more? How could we do to run it again?


(Vivek Saraswat) #2

Hi gerdogdu,

In order for us to help with this, can you please provide a bit more context into what happened? (In particular CLI commands that you initiated). Also what errors are you getting from UCP when it is not working?


(Gerdogdu) #3

Stop docker engine with ucp installed from docker-machine stop node-01. Start another docker engine via docker-machine start. node-02. Now, starts node-01 and node-01 IP address has changed. Now, it is impossible to login UCP admin console. Look looks for UCP console and see that old IP not accessisble.


(Vivek Saraswat) #4

What driver are you using for docker machine? If you are running locally (e.g. virtualbox or fusion drivers) docker-machine stop shouldn’t change the host IPs. It may be different for public cloud drivers, however.

However, changing the host IP would cause issues with the cluster, as it expects the IP of the host to stay the same.


(Gerdogdu) #5

VirtualBox in MAC. If you have more than one engine created with docker-machine, then it changes the IP address.


(Vivek Saraswat) #6

Okay, I understand the issue now. It is a Docker Machine one and not a UCP one–looks like there is an open issue in Docker Machine to specify a static IP for VirtualBox driver: https://github.com/docker/machine/issues/1709

In the meantime, see if the workarounds either in the github issue above or this stackoverflow post can help: http://stackoverflow.com/questions/32639765/how-do-i-create-a-docker-machine-with-a-specific-url-using-docker-machine-and-vi/35367277