This image inherits from the node
image adding support to manage the Node.js configuration through Consul
It includes :
- S6 Overlay to properly manage multiple services in one container
- Consul template to manage dynamic configuration based on Consul
To run a single script, you can mount it in a volume under /app
. From the root of your application directory (assuming your script is named hello.js
):
docker run -v ${PWD}:/app -w /app -it --rm 1science/node node hello.js
The following example mount the Consul template configuration in the container:
docker run --name nginx-consul -v etc/consul-template:/etc/consul-template:ro -d 1science/nginx:consul
An image based on the lightweight Alpine Linux distribution is available with the tag {version}-alpine
.