Skip to content

Provides a convenience Docker image to run Node services under Supervisord.

License

Notifications You must be signed in to change notification settings

nefarius/docker-node-service-host

Repository files navigation

docker-node-service-host

Docker Image CI Docker Pulls Docker Image Size (latest by date)

Provides a convenience Docker image to run Node services under Supervisord.

How to use

Base your image on this one to get an Alpine Linux container with latest Node.js and Supervisord pre-installed.

You can grab it directly from Docker hub via docker pull containinger/docker-node-service-host.

Copy a service configuration file for your service (like the example below) into /etc/supervisor/conf.d/:

[program:server]
directory=/my/working/directory
command=node run
user=node
stdout_logfile=/dev/stdout
redirect_stderr=true
stdout_logfile_maxbytes=0
autorestart=true

Optionally copy one or more script files that should run on container startup to /docker-entrypoint-initdb.d, they will get executed before supervisord runs (e.g. to perform mandatory initialization tasks).

How to build

All base images are based on Alpine Linux but you can influence the Node version that will be used with the NODE_VERSION build argument.

Examples

Use latest Node

docker build -t containinger/docker-node-service-host:latest --pull --build-arg NODE_VERSION=current .

Use Node v14

docker build -t containinger/docker-node-service-host:14 --pull --build-arg NODE_VERSION=14 .

About

Provides a convenience Docker image to run Node services under Supervisord.

Topics

Resources

License

Stars

Watchers

Forks