Overview & links
This repository has been built to provide docker builds for NodeJS on CentOS. Bellow you will find the list of supported NodeJS/CentOS versions:
Create a Dockerfile in your Node.js app project
FROM yoanisgil/nodejs:centos6.6-0.12 # replace this with your application's default port EXPOSE 8888
You can then build and run the Docker image:
docker build -t my-nodejs-app . docker run -it --rm --name my-running-app my-nodejs-app
The image assumes that your application has a file named package.json listing its dependencies and defining its start script.
##Run a single Node.js script
For many simple, single file projects, you may find it inconvenient to write a complete Dockerfile. In such cases, you can run a Node.js script by using the Node.js Docker image directly:
docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp yoanisgil/nodejs:centos6.6-0.12 node your-daemon-or-script.js
Issues & contributions
If you have any problems with or questions about this image, please contact us through a GitHub issue
You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can.
Before you start to code, we recommend discussing your plans through a GitHub issue, especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing.