Public Repository

Last pushed: 5 days ago
Short Description
Node.js is a JavaScript-based platform for server-side and networking apps. Maintained by Resin.io.
Full Description

This image is part of the resin.io base image series for IoT devices. The image is optimized for use with resin.io and resinOS, but can be used in any Docker environment running on the appropriate architecture.

What is resin.io?

Resin.io is the simplest way to build, deploy, and manage containers on a fleet of connected devices. Resin.io brings a modern developer workflow to the Internet of Things, enabling rapid innovation at every stage and scale of your project.

Supported tags and respective Dockerfile links

For more information about this image and its history, please see the relevant manifest file (resin/odroid-xu4-fedora-node) in the resin-io-library/official-images GitHub repo.

What is Node.js?

Node.js is a software platform for scalable server-side and networking applications. Node.js applications are written in JavaScript and can be run within the Node.js runtime on Mac OS X, Windows, and Linux without changes.

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.

Node.js internally uses the Google V8 JavaScript engine to execute code; a large percentage of the basic modules are written in JavaScript. Node.js contains a built-in, asynchronous I/O library for file, socket, and HTTP communication. The HTTP and socket support allows Node.js to act as a web server without additional software such as Apache.

wikipedia.org/wiki/Node.js

How to use this image

Systemd can be enabled by adding ENV INITSYSTEM on to your Dockerfile below the FROM <Docker image> line. This will trigger Systemd init system on the Docker image.

Create a Dockerfile in your Node.js app project

FROM resin/odroid-xu4-fedora-node:onbuild
# Enable Systemd
ENV INITSYSTEM on
# 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

Notes

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 resin/odroid-xu4-fedora-node:latest node your-daemon-or-script.js

License

View license information for the software contained in this image.

Supported Docker versions

This image is officially supported on Docker version 17.05.0-ce.

Support for older versions (down to 1.0) is provided on a best-effort basis.

User Feedback

Issues

If you have any problems with or questions about this image, please contact us through a GitHub issue.

Contributing

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.

Documentation

Documentation for this image is stored in the base images documentation. Check it out for list of all of our base images including many specialised ones for e.g. node, python, go, smaller images, etc.

Docker Pull Command
Owner
resin

Comments (0)