mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
add port forwarding notes for mac/boot2docker docs
Docker-DCO-1.1-Signed-off-by: Cameron Boehmer <cameron.boehmer@gmail.com> (github: cameronboehmer)
This commit is contained in:
parent
8228e50581
commit
49b928c0b0
1 changed files with 20 additions and 5 deletions
|
@ -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
|
||||
--------------
|
||||
|
||||
|
|
Loading…
Reference in a new issue