Skip to content

Instantly share code, notes, and snippets.

@jgensler8
Last active March 29, 2016 21:31
Show Gist options
  • Save jgensler8/672a6fa30ebd0dd164f3 to your computer and use it in GitHub Desktop.
Save jgensler8/672a6fa30ebd0dd164f3 to your computer and use it in GitHub Desktop.
Maybe get around those funny networking things
docker-machine create --driver virtualbox --tls-san 127.0.0.1 --virtualbox-hostonly-cidr "10.0.0.1/24" a
docker-machine create --driver virtualbox --tls-san 127.0.0.1 --virtualbox-hostonly-cidr "172.16.0.1/24" b
docker-machine create --driver virtualbox --tls-san 127.0.0.1 --virtualbox-hostonly-cidr "192.168.0.1/24" c
# set your http_proxy and https_proxy variables before running
docker-machine create --driver virtualbox --tls-san 127.0.0.1 --engine-env HTTP_PROXY=${http_proxy} --engine-env HTTPS_PROXY=${https_proxy} --virtualbox-hostonly-cidr "10.0.1.1/24" ap
docker-machine create --driver virtualbox --tls-san 127.0.0.1 --engine-env HTTP_PROXY=${http_proxy} --engine-env HTTPS_PROXY=${https_proxy} --virtualbox-hostonly-cidr "172.16.1.1/24" bp
docker-machine create --driver virtualbox --tls-san 127.0.0.1 --engine-env HTTP_PROXY=${http_proxy} --engine-env HTTPS_PROXY=${https_proxy} --virtualbox-hostonly-cidr "192.168.1.1/24" cp
machine_name="default"
port_start=32000
port_end=32900
for i in {${port_start}..${port_end}}; do
VBoxManage modifyvm "${machine_name}" --natpf1 "tcp-port$i,tcp,127.0.0.1,$i,,$i";
done
traceroute 10.0.0.100
traceroute 172.16.0.100
traceroute 192.168.0.100
traceroute 10.0.1.100
traceroute 172.16.1.100
traceroute 192.168.1.100
# check this file for proxy information
file=/var/lib/boot2docker/profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment