Last active
May 13, 2018 16:18
-
-
Save luislavena/8bc081f90d8341ef7d9fae98870e4a58 to your computer and use it in GitHub Desktop.
Setup fixed IP for docker-machine (boot2docker)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ docker-machine create --driver virtualbox --virtualbox-cpu-count 2 --virtualbox-memory 2048 --virtualbox-hostonly-cidr "192.168.59.3/24" default | |
$ docker-machine ssh default | |
# add script (shown below) and reboot | |
$ docker-machine regenerate-certs default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# save as /var/lib/boot2docker/bootsync.sh | |
# chmod +x bootsync.sh | |
/etc/init.d/services/dhcp stop | |
ifconfig eth1 192.168.59.103 netmask 255.255.255.0 broadcast 192.168.59.255 up |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment