Skip to content

Instantly share code, notes, and snippets.

@bsy
Last active August 29, 2015 13:56
Show Gist options
  • Save bsy/8964541 to your computer and use it in GitHub Desktop.
Save bsy/8964541 to your computer and use it in GitHub Desktop.
boot2docker port forwarding
# 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