Last active
January 23, 2018 09:12
-
-
Save glennschler/9fe9e070afb11b94612d to your computer and use it in GitHub Desktop.
Revisions
-
glennschler revised this gist
Sep 6, 2015 . 2 changed files with 19 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,5 +14,5 @@ EXPOSE 8080 ENTRYPOINT ["node-debug"] # These are default parameters which can be overriden at run time CMD ["--web-host", "0.0.0.0", "--cli", "true", "./index.js"] This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,12 +2,26 @@ 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 ```bash # list containers -
glennschler revised this gist
Sep 6, 2015 . 1 changed file with 10 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,8 +10,15 @@ docker run -it --name iojsdebug -d -p 8080:8080 iojsdebug -cli true ./test/test1 Some additonal commands ```bash # 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}') ``` -
glennschler revised this gist
Sep 6, 2015 . 2 changed files with 9 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ FROM node:onbuild ADD ./package.json /tmp/package.json RUN npm install -g node-inspector @@ -14,5 +14,5 @@ EXPOSE 8080 ENTRYPOINT ["node-debug"] # These are default parameters which can be overriden at run CMD ["--web-host", "0.0.0.0", "--cli", "true", "./index.js"] This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,11 @@ ```bash docker build -t nodedebug . docker build -t iojsdebug --file=iojs/Dockerfile . docker run -it --name nodedebug -d -p 8080:8080 nodedebug -cli true # example with different node js (must have been in the dir when built) docker run -it --name iojsdebug -d -p 8080:8080 iojsdebug -cli true ./test/test1.js $APPARG1 CMDARG2 ``` Some additonal commands -
glennschler revised this gist
Sep 3, 2015 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,18 +1,18 @@ FROM node ADD ./package.json /tmp/package.json RUN npm install -g node-inspector RUN cd /tmp && npm install RUN mkdir -p /opt/app/node RUN if [ -d /tmp/node_modules ] ; then cp -a /tmp/node_modules /opt/app/node; fi WORKDIR /opt/app/node ADD . /opt/app/node RUN cd /opt/app/node EXPOSE 8080 ENTRYPOINT ["node-debug"] # These are default parameters which can be overriden at run time CMD ["--web-host", "0.0.0.0", "--cli", "true", "./index.js"] -
glennschler revised this gist
Sep 3, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,4 +8,5 @@ Some additonal commands docker ps -l docker stop debugdock docker rm debugdock docker exec -i -t dockdebug bash ``` -
glennschler revised this gist
Sep 3, 2015 . 2 changed files with 13 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,13 @@ FROM node ADD nodeapp/package.json /tmp/package.json RUN npm install -g node-inspector RUN cd /tmp && npm install RUN mkdir -p /opt/app/node RUN if [ -d /tmp/node_modules ] ; then cp -a /tmp/node_modules /opt/app/node; fi WORKDIR /opt/app/node ADD nodeapp /opt/app/node RUN cd /opt/app/node EXPOSE 8080 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ ```bash docker build -t dockdebug . docker run -it --name dockdebug -d -p 8080:8080 dockdebug ``` Some additonal commands ```bash docker ps -l docker stop debugdock docker rm debugdock ``` -
glennschler created this gist
Sep 2, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ FROM node ADD package.json /tmp/package.json RUN npm install -g node-inspector RUN cd /tmp && npm install RUN mkdir -p /opt/app/node RUN if [ -d /tmp/node_modules ] ; then cp -a /tmp/node_modules /opt/app/node; fi WORKDIR /opt/app/node ADD . /opt/app/node RUN cd /opt/app/node EXPOSE 8080 ENTRYPOINT ["node-debug"] # These are default parameters which can be overriden at run time CMD ["--web-host", "0.0.0.0", "--cli", "true", "./index.js"]