As a web designer I have been using VirtualBox to set up temporary work servers for my projects. Lately I've been trying to reduce the number of virtual machines on my laptop(due to limitations of SSD capacity) and I thought learning and using Docker may be beneficial in terms of system storage, deployment of finished work, and in futureproofing my skillsets. Until now, I have been using host-only adapter in addition to NAT to connect to APM server in my virtualmachine from my host(which is usualy Windows).
The following is /etc/network/interfaces setting I normally use:
# The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet dhcp # VBOX Host-only adapter auto eth1 iface eth1 inet static network 192.168.56.0 address 192.168.56.80 netmask 255.255.255.0
I am thinking about IP aliasing to assign more IPs to the Host-only adapter(
192.168.56.81, 192.168.56.82...) and routing each of them to each of the containers, which will each be running one of my projects. It looks like Docker gets to have its own network interface,
docker0, which cannot be accessed from the VirtualBox host machine. From what I can tell, I have a few possible approaches:
- route the connection from the host to the host-only adapter to the docker0 interface
- somehow find a way to connect to the docker0 interface from the host machine, or
- somehow find a way to connect the containers to host-only interfaces
I want to know which one of these approaches is the most viable way for me to take.
I am not sure if my question if clear enough. Please let me know if I should be providing more information in order to make this question answerable.