Merge pull request #4020 from cameronboehmer/patch-1

add vm port forwarding note/example in osx install docs
This commit is contained in:
Andy Rothfusz 2014-02-11 16:18:54 -08:00
commit 3122b4b470
1 changed files with 20 additions and 5 deletions

View File

@ -116,6 +116,21 @@ client just like any other application.
# Git commit (server): c348c04
# Go version (server): go1.2
Forwarding VM Port Range to Host
-------------------------------
If we take the port range that docker uses by default with the -P option
(49000-49900), and forward same range from host to vm, we'll be able to interact
with our containers as if they were running locally:
.. code-block:: bash
# vm must be powered off
for i in {4900..49900}; do
VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port$i,tcp,,$i,,$i";
VBoxManage modifyvm "boot2docker-vm" --natpf1 "udp-port$i,udp,,$i,,$i";
done
SSH-ing The VM
--------------