-
-
Save geek/162d18551c0d21ff5fd6 to your computer and use it in GitHub Desktop.
docker-machine create -d vmwarefusion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
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 docker-machine 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}" "${dir}" | |
echo "You should be able to run 'eval \"\$(docker-machine env ${name})\"'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment