1

I'm trying to create a docker virtual machine and specifying its IP address. This is the command I am using

docker-machine create -d virtualbox --virtualbox-hostonly-cidr "192.168.99.110/24" --virtualbox-memory 4096 devmachine

However, it still assigns an IP address incremented by 1. For instance, if I have a default virtual machine with an IP address of 192.168.99.100, the machine that I created will be assigned an IP address of 192.168.99.101.

How to specify the IP address when creating a docker virtual machine?

jmc
  • 1,649
  • 6
  • 26
  • 47
  • This may help you: http://stackoverflow.com/questions/34336218/is-there-a-way-to-force-docker-machine-to-create-vm-with-a-specific-ip – JesusTinoco Oct 12 '16 at 07:57
  • @JesusRT I have been to that page. The workaround they suggest is using `--virtualbox-hostonly-cidr` which I did. And it does not work :) – jmc Oct 12 '16 at 08:00
  • Well looks like is not possible. Why you need to specify an ip address? Maybe your issue can be resolved in other way – Carlos Rafael Ramirez Oct 12 '16 at 17:05
  • @CarlosRafaelRamirez I need to have the IP address of the docker machine before creating it. It gives me more control in terms of storing configuration - In contrast to waiting for an IP provided by docker – jmc Oct 13 '16 at 01:15

0 Answers0