Things I wish I knew before I started using Docker
boot2docker init
boot2docker up
docker build -t hookio .
docker run -p 49160:9999 hookio
docker run -p 49160:9999 -i hookio
curl $(boot2docker ip):49160
docker ps
docker stop <id>
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
docker-compose build
docker-compose up
docker exec -i -t 665b4a1e17b6 bash #by ID
- virtual box gives the instance its own network ip ( probably in 192.168.*.*range )
- knowing this ip address may be important to your application
- if you crash the docker vm and restart, you'll have to re-export ENV variables ( read output of boot2docker up)
- all configuration paths in your application should be based to __dirname ( if not already )
- don't forget to run docker-compose buildbeforedocker-compose up