Public Repository

Last pushed: 2 years ago
Short Description
Lightweight (~33 MB) Node.js image based on Alpine
Full Description

Supported tags


This image contains Node.js v5.6 and NPM v3.7. It is based on Alpine linux, which, despite being a very lightweight distribution, provides apk package manager, allowing easy installation of many pre-built packages.


node-alpine:latest, node-alpine:XXX

Basic image. Contains Node and NPM.


node-alpine:onbuild, node-alpine:XXX-onbuild

Extended version of the image with added ONBUILD triggers (similar to and inspired by google/nodejs-runtime image). These triggers execute on each build of a derived image, and perform two tasks:

  • Copy everything from the directory containing Dockerfile to the /app directory inside the container, but skip node_modules directory and all files/dirs listed in the .dockerignore file;
  • Install NPM-managed dependencies; reuse Docker image cache if dependencies have not changed since previous build.

This allows Dockerfiles of derived images to contain less boilerplate instructions:

FROM ficusio/node-alpine:5-onbuild
EXPOSE 8080
# This will be performed automatically:
# WORKDIR /app
# COPY . /app
# npm install --production
# CMD ["node", "index.js"]

The image's Dockerfile contains comments that explain all steps performed by these triggers. There is also an example application which uses this image as a base.

Docker Pull Command
Owner
ficusio

Comments (0)