Because:
This docker image is built on top of BusyBox (using progrium/busybox as the base image) and highly inspired of hwestphal/nodebox.
Thanks to the size of BusyBox, the image weights about 40MB and provides everything you need to run a nodejs application.
This is as simple as:
docker run --rm jubianchi/docker-node-4 -v
v4.1.0
Let's say you have an nodejs application which main file is index.js:
'use strict';
let main = () => console.log('Hello World!');
process.on('SIGUSR2', () => main());
process.on('SIGINT', () => process.exit(1));
process.on('SIGTERM', () => process.exit(1));
main();
process.stdin.resume();
And you want to run it in a docker-node-4 container:
docker run --rm -v $(pwd):/app --name test_app jubianchi/docker-node-4 /app/index.js
Hello World!
Now if you want to:
docker kill -s SIGUSR2 test_appdocker kill test_app or CTRL+CPretty simple! Now what if you want to run an actual application ?
You will likely want to run more complex application inside this container. In this case, you'll probably have to run npm install or whatever
is needed to make your app run. In this case you should extend this base image to build your own application container:
FROM jubianchi/docker-node-4
ENV NODE_ENV=production
COPY app /app
WORKDIR /app
RUN npm install && \
npm cache clear
ENTRYPOINT ["/node-v4.1.0-linux-x64/bin/node", "/app/index.js"]
Content type
Image
Digest
sha256:cc473e9b1…
Size
14.3 MB
Last updated
about 11 years ago
docker pull jubianchi/docker-node-4