docker_machine_create_vmwarefusion () {
name="${1:-test}"
dir="${HOME}/.docker/machine/machines/${name}"
vmx="${dir}/${name}.vmx"
vmrun="/Applications/VMware Fusion.app/Contents/Library/vmrun"
# Something about the initial run of docker-machine+vmwarefusion needs sudo
sudo $(which docker-machine) -D create -d vmwarefusion "${name}"
# Needs to shut down cleanly, which will also need sudo
sudo "${vmrun}" stop "${vmx}"
# Change the owner back to current user
sudo chown -R "${USER}" "${HOME}/.docker"
# Upgrade the VM hardware
#"${vmrun}" upgradevm "${vmx}"
echo "You should be able to run 'eval \"\$(docker-machine env ${name})\"'"
}
Last active
November 23, 2015 16:38
-
-
Save mikew/66e15a8be8eaf7d6043c to your computer and use it in GitHub Desktop.
docker-machine create -d vmwarefusion
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment