Skip to content

Latest commit

 

History

History
69 lines (48 loc) · 2.37 KB

README.md

File metadata and controls

69 lines (48 loc) · 2.37 KB

MIT license Maintenance level: Love Nightly Builds Release to Docker Registries

Flownative Node.js Image

A Docker image providing Node.js for Beach, Local Beach and other purposes.

tl;dr

$ docker run flownative/nodejs

Hosting a Node application

tbd.

Configuration

Logging

By default, the access log is written to STDOUT and the error log is redirected to STDERR. That way, you can follow logs by watching container logs with docker logs or using a similar mechanism in Kubernetes or your actual platform.

Environment variables

Variable Name Type Default Description

Security aspects

This image is designed to run as a non-root container. Using an unprivileged user generally improves the security of an image, but may have a few side-effects, especially when you try to debug something by logging in to the container using docker exec.

When you are running this image with Docker or in a Kubernetes context, you can take advantage of the non-root approach by disallowing privilege escalation:

$ docker run flownative/nodejs:latest --security-opt=no-new-privileges

Because Node.js runs as a non-root user, it cannot bind to port 80 and users port 8080 instead. Since you can map that port to any other port by telling Docker or Kubernetes, this won't be a problem in practice. However, be aware that you need to specify 8080 as the container port – otherwise you won't get a connection.

Building this image

Build this image with docker build. You need to specify the desired version for some of the tools as build arguments:

docker build -t flownative/nodejs:latest .

Check the latest stable release on the tool's respective websites: