Boot2docker changes the default IP address 192.168.59.103 to 192.168.59.104 (Mac)

boot2docker worked all the time on 192.168.59. 103 .

Suddenly, the boot2docker ip command gives 192.168.59. 104 .

The problem is that now I need to change all the /etc/hosts entries.

How to make boot2docker static IP?

Side question: should I completely remove boot2docker and run everything inside the Vagrant machine?

I am running on Mac X v10.10 (Yosemite).

+5
source share
3 answers

If you have not already done so, create a Docker configuration with:

 boot2docker config > ~/.boot2docker/profile 

Then edit the Docker configuration with the following line:

 UpperIP = "192.168.59.103" 

Then follow other steps to clear old Docker images and start a new one.

I also had problems connecting to Docker, but restarting the system resolved them.

+3
source

After removing the virtual machine from the VirtualBox GUI (delete everything), it works again on 103. I think that something was confused with boot2docker when using it.

0
source

To remove the virtual machine and restart it again, like @ramden, you could do:

You can remove all containers from the current environment by running

$ docker rm $(docker ps -a -q)

To delete all images:

$ docker rmi $(docker images -q)

Reboot the virtual machine by clearing the entire cache of old images by doing the following

 $ boot2docker delete $ boot2docker init $ boot2docker start 

I just ran into the same problem and couldn't find the answer right away, maybe it's worth it to be interested in the future.

Greetings.

0
source

Source: https://habr.com/ru/post/1211373/


All Articles