Note: Better install 'Docker for Mac' to share docker socket
- Visit https://www.docker.com/products/docker-toolbox and download dmg
- Install > Select "Docker quickstart Terminal"
- You can see "Default" is being installed in VirtualBox
- Wait until Docker ASCII art appears in your terminal
docker-machine create --driver virtualbox <Docker hostname>- Now you see "" is ruuning in VirtualBox
- Try
docker-machine env <Docker hostname>and you see your host's env var. Runeval $(docker-machine env <Docker hostname>)to vonnect your shell to the new machine - See these commands (relevant, not necessary)
docker-machine config <Docker hostname>- set the config with
docker $(docker-machine config vbox)
- Also, see these commands
docker-machine lsdocker-machine start <Docker hostname>docker-machine stop <Docker hostname>docker-machine rm <Docker hostname>
- Change your directory to where you saved
Dockerfileanddocker-compose.yml docker-compose build && docker-compose up --no-deps -d- Try to access in your browser
http://192.168.99.100:8000/-
192.168.99.100is the IP of your docker machine.docker-machine ip <Docker hostname>
-
8000is the port my Nginx exposes
-
Reference: https://docs.docker.com/machine/get-started/
Look forward: https://alexanderzeitler.com/articles/docker-machine-and-docker-compose-developer-workflows/