Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does --virtualbox-hostonly-cidr do during docker machine creation?

Hi I want to create a Docker machine on Windows and have Docker Toolbox and have to execute this code

./docker-machine create -d virtualbox  --virtualbox-boot2docker-url https://github.com/boot2docker/boot2docker/releases/download/v1.11.2/boot2docker.iso --virtualbox-memory 3240 --virtualbox-cpu-count 2 --virtualbox-disk-size 30480 --virtualbox-hostonly-cidr "192.168.56.1/24" local

So I am wondering what is --virtualbox-hostonly-cidr and does it make

The official documentation says:

--virtualbox-hostonly-cidr "192.168.99.1/24"                                                         Specify the Host Only CIDR [$VIRTUALBOX_HOSTONLY_CIDR]

which I do not understand. Please can you explain in more details for a developer with low network culture.

like image 674
Xelian Avatar asked Oct 28 '22 19:10

Xelian


1 Answers

192.168.99.1/24 is CIDR or network which your virtual machine running docker will connect to.

This network is created as a virtual network in "host-only mode" in VirtualBox, which means your machine will be able to talk to host and other virtual machines which connected to same network.

More documentation on host-only networks is available in VirtualBox docs: https://www.virtualbox.org/manual/ch06.html#network_hostonly

like image 108
Nebril Avatar answered Nov 10 '22 15:11

Nebril