docker build -t nodedebug .
docker build -t iojsdebug --file=iojs/Dockerfile .
docker run -it --name nodedebug -d -p 8080:8080 nodedebug
# example with different js (js must have been in the path when built)
docker run -it --name iojsdebug -d -p 8080:8080 iojsdebug ./test/test1.js $APPARG1 CMDARG2
docker run -it --name iojsdebug2 -d -p 8081:8080 iojsdebug ./test/test1.js $APPARG1 CMDARG2
# start up two then examine the port that was auto forwarded
docker run -it --name iojsdebug2 -d -P iojsdebug
docker run -it --name iojsdebug -d -P iojsdebug
docker ps
# list the IP address of docker machine. For example, if machine is named "docker"
# To get the IP to navigate to in blink tools browser (chrome)
docker-machine ip docker
Then navigate chrome or webstorm to
- http://192.168.99.102:32775/?port=5858
- or the default with just one running: http://192.168.99.102:8080/?port=5858
Some additonal commands
# list containers
docker ps -l
docker stop nodedebug
docker rm nodedebug
# bash into the running container
docker exec -i -t iodebug bash
# remove any recently created images
docker rmi $(docker images | awk '$5 ~ /minutes/ {print $3}')