Last active
August 29, 2015 13:56
-
-
Save bsy/8964541 to your computer and use it in GitHub Desktop.
boot2docker port forwarding
This file contains hidden or 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
# Add to your .bash_profile | |
function dfwd { | |
VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port$1,tcp,127.0.0.1,$1,,$1" | |
} | |
function ddfwd { | |
VBoxManage modifyvm "boot2docker-vm" --natpf1 delete "tcp-port$1" | |
} | |
# To enable a port: | |
$ boot2docker down | |
$ dfwd 3000 | |
$ boot2docker up |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment