Skip to content

Instantly share code, notes, and snippets.

@jroes
Last active January 24, 2016 06:39
Embed
What would you like to do?
#!/bin/bash
machine_name=dev
interface=vboxnet1
sudo route -n delete 192.168.99.0
sudo route -n add -net 192.168.99.0/24 -interface $interface
docker-machine rm $machine_name
docker-machine create --driver virtualbox $machine_name
eval "$(docker-machine env $machine_name)"
# Troubleshooting
# Figure out what interface you're using to get to the machine
# route -n get 192.168.99.1 | grep interface
# Figure out what interface is actually listening in the 192.168.99.* address space.
# ifconfig | grep "inet 192.168.99" -B 2
# If you're running into issues, pass the -D flag to docker-machine:
# docker-machine create --driver virtualbox $machine_name -D
# Note: It's okay if you see errors early on like:
# ssh exit code 255
# Daemon not responding yet: dial tcp 192.168.99.104:2376: connection refused
# I think these are just happening because the VM isn't ready yet after a
# previous operation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment