Merge pull request #4020 from cameronboehmer/patch-1
add vm port forwarding note/example in osx install docs
This commit is contained in:
commit
3122b4b470
|
|
@ -116,6 +116,21 @@ client just like any other application.
|
||||||
# Git commit (server): c348c04
|
# Git commit (server): c348c04
|
||||||
# Go version (server): go1.2
|
# 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
|
SSH-ing The VM
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue