May 2017

Using Docker With Homebrew and VMware Fusion on Mac

Install Docker with Homebrew

brew install docker
brew install docker-machine

Create Default Machine with VMware Fusion Driver

docker-machine create --driver vmwarefusion default

Eval Env and Manage

eval $(docker-machine env default)
docker info

Config Network

Get the HWaddr of VM and stop VM

docker-machine ssh default ifconfig -a | grep eth0
docker-machine stop default

Edit the VMware NAT network adapter

sudo vi "/Library/Preferences/VMware Fusion/vmnet8/dhcpd.conf"

Added the following line

host default {
    hardware ethernet 00:0C:29:E6:F9:AC;

Stop VMware network services

sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --stop

Add static route

sudo route -n add

Start VM and regenerate certificates

docker-machine start default
docker-machine regenerate-certs default
comments powered by Disqus