Skip to content

Instantly share code, notes, and snippets.

@fccoelho7
Last active August 29, 2019 11:55
Show Gist options
  • Save fccoelho7/bcbdb250865e2bcccc4436c8f9cae9f1 to your computer and use it in GitHub Desktop.
Save fccoelho7/bcbdb250865e2bcccc4436c8f9cae9f1 to your computer and use it in GitHub Desktop.
Using Docker with VirtualBox on MAC

Using Docker with VirtualBox on MAC

Steps

  1. Install the VirtualBox, run: brew cask install virtualbox
  2. Install some Docker stuff, run: brew install docker docker-machine docker-compose
  3. If you don't have any machine yet, run: docker-machine create
  4. Add some envs to terminal, run: echo "eval $(docker-machine env)" >> ~/.zshrc
  5. Edit host file proxying local domains to docker-machine ip, run sudo vim /etc/hosts and paste the code below:
192.168.99.100	site.localtest.me
192.168.99.100	api.localtest.me

An additional tool to leave everything fast: https://github.com/adlogix/docker-machine-nfs

  1. Install Docker Machine NFS, run: brew install docker-machine-nfs
  2. Activate NFS, run: docker-machine-nfs default

Finnally, move Docker for Mac to trash. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment