Open chouclee opened 9 years ago
We currently don't have a mechanism in place in machine to do this. You would have to use the Fusion UI. We've discussed port forwarding for local and it's getting more and more request. We should put together a formal proposal to do this for local providers.
+1
+1
+1
+1
+1
+1
You can manually do it by editing: /Library/Preferences/VMware\ Fusion/vmnet{{ N }}/nat.conf
Lets say you want to forward port 80:
docker-machine ip {{ your machine name }}
edit
/Library/Preferences/VMware\ Fusion/vmnet8/nat.conf
Find the section:
[incomingtcp]
# Use these with care - anyone can enter into your VM through these...
# The format and example are as follows:
#<external port number> = <VM's IP address>:<VM's port number>
80 = {{ your machine ip }}:80
Now run the following:
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --stop
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --start
Evidently the Pro versions of Fusion (6,7,8) have a GUI for doing this.
Anyone knows how to do port forwarding via docker machine?
I need to let other computers access the web services I deployed in containers. So only port forwarding could work.
Virtual Box could do that, but the shared folder performance is just super slow.