Docker Runtime for Node.js Apps
What is Node.js?
Node.js applications are designed to maximize throughput and efficiency, using non-blocking I/O and asynchronous events. Node.js applications run single-threaded, although Node.js uses multiple threads for file and network events. Node.js is commonly used for real-time applications due to its asynchronous nature.
What is this image?
When working with Node.js and Docker, there are two most common tasks that you will face:
- Local Node.js development with docker-compose;
- Building a production Docker image for your app.
This image is an attempt to solve both problems.
How to use this image?
When working with this image locally, all you need to do is to mount a folder with you source code to
/app volume of the container.
This method is using
node-supervisor package for live code reload.
Here is the
meteor-app: image: codexsystems/node restart: unless-stopped volumes: - ./:/app
Building an image for your app
That's simple. Really. Just add the following
Dockerfile into the root of your app:
Then you can build the docker image with:
docker build -t yourname/app .
Then run it:
docker run -d yourname/app
- Report any issues on the GitHub.
This image is released under the MIT License. See the bundled LICENSE.md for details.