Skip to content

Instantly share code, notes, and snippets.

@tanmally
Created April 10, 2014 12:24
Show Gist options
  • Save tanmally/10376201 to your computer and use it in GitHub Desktop.
Save tanmally/10376201 to your computer and use it in GitHub Desktop.
Virtualbox docker port mapping for windows batch file
FOR /L %%A IN (49152,1,65535) DO (
VBoxManage modifyvm "$vm_name" --natpf1 "tcp-port-%%A,tcp,,%%A,,%%A";
)
@tanmally
Copy link
Author

Turn off your virtual box vm before running the command , it takes a while to complete (10 odd mins)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment