docker nodejs

Posted on Actualizado enn

/////running nodejs like service////

sudo npm install forever -g
sudo ln -s "$(which nodejs)" /usr/local/bin/node

forever start server.js

forever stop server.js

http://stackoverflow.com/questions/12701259/how-to-make-a-node-js-application-run-permanently

http://stackoverflow.com/questions/4018154/node-js-as-a-background-service

http://stackoverflow.com/questions/30281057/node-forever-usr-bin-env-node-no-such-file-or-directory

http://www.slidequest.com/q/70ang

//////

graph android http://stackoverflow.com/questions/9741300/charts-for-android

http://mayankj00.blogspot.mx/2014/01/using-holograph-library-for-your.html

https://bitbucket.org/danielnadeau/holographlibrary/src/0b41d14f5724c8df3bdd2d64fa039dc531230d33/HoloGraphLibrarySample/res/values/dimens.xml?at=master&fileviewer=file-view-default

https://github.com/EddieRingle/HoloGraphLibrary/blob/master/sample/src/main/java/com/echo/holographlibrarysample/BarFragment.java

///

  • install docker
  • verify installation
    • $ sudo docker version
  • First container
    • $ sudo docker run hello-world
  • list containers
    • $ sudo docker ps -a
    • [containderid / ports / image / name / command / created / status]
  • Docker hub
  • Dockerfile
    • FROM node:6.9.4
      EXPOSE 8080
      WORKDIR /app
      RUN npm install nodemon -g
      COPY package.json /app/package.json
      RUN npm install
      COPY server.js /app
      CMD [“nodejs”, “/app/server.js”]
      #sudo docker build -t minode/node-web-app .
    • minode is your username in hub.docker.com
    • $ cd <your project directory>
      $ sudo docker build -t minode/node-web-app .
      #          ^    ^                     ^
      #        build  w/ tag            this directory
      
      # ... lots of output
  • Docker images
    • $ sudo docker images
    • $ sudo docker run -p 3000:8080 -d minode/node-web-app
    • [$ sudo docker run -it –rm –name myrunningapp minode/node-web-app 3000:8080]–rm remove container when exist
    • $ sudo docker ps
$ docker run -p 4500:4500 minode/node-web-app
#               ^^^^^^^^^
#          bind the exposed container port to host port (on the virtual machine)
  • Docker stop / start
    • $ sudo docker stop <CONTAINER ID>
    • $ sudo docker start <DOCKER NAME> –you can see that with sudo docker ps
  • deleting container, drop all info
    • $ sudo docker rm <drupal1>
  • publish
    • $sudo docker build -t “your_user_name/myapp” .
    • $ docker push <your_user_name/myapp>  / minode/node-web-app

 

 

sudo docke

 

/////////

$sudo docker run –name mynode -t -i node

Anuncios

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s