This Dockerfile setup assumes you are going to be using the same physical mac for a project. In theory, it should not matter which physical mac you end up using, but I take no responsibility if you change where you sit, and stuff suddenly doesn't work >_>.
Run these following commands:
- docker-machine create --driver virtualbox sommelier
If docker-machine doesn't run, you'll need to: brew install docker-machine
Wait for 1) to finish running completely before running 2)!!
- eval $(docker-machine env sommelier)
-
docker build -t ft_sommelier .
-
docker volume create notebooks
Remember the 8888/?token=... part that will show up when you run 5)!!
- docker run -it -p 8888:8888 -v notebooks:/notebooks ft_sommelier
You can get your with: docker-machine ip sommelier
In your browser address:
- :8888/?token=...%
If you log out or restart your computer you'll need to restart the docker machine when you log back into your mac. Run the following:
- docker-machine start sommelier
- eval $(docker-machine env sommelier) Then you can proceed to re-run steps 5) and 6) again
After you are done with the project it might be a good idea to clean up all images and the virtual machine since they take up a LOT of space... (Do it for Tony!!!)
WARNING: THE FOLLOWING COMMANDS WILL DELETE ALL NOTEBOOKS AND DATA!!
- docker stop $(docker ps -a -q)
- docker rmi $(docker images -a -q)
- docker volume prune
- docker-machine rm sommelier