Sign inSign up

enil/alpine-node

By enil

•Updated about 10 years ago

A docker image running node.js on Alpine Linux

Image
0

1.4K

enil/alpine-node repository overview

⁠Alpine Node Docker image

enil/alpine-node

A Docker image running node.js⁠ with tini⁠ on Alpine Linux⁠. The repo contains Dockerfiles for images for node.js v6.2 including an onbuild variant.

⁠Usage

⁠enil/alpine-node:6.2

The enil/alpine-node:6.2 image can be run by specifying a volume and a command running the application with node:

docker run -v .:/usr/src/app -w /usr/src/app -p 8080:8080 enil/alpine-node:6.2 npm start
⁠enil/alpine-node:6.2-onbuild

The enil/alpine-node:6.2-onbuild can be used as a base image for a Dockerfile:

FROM enil/alpine-node:6.2-onbuild

CMD ["npm", "start"]

By extending the base image the contents of the context directory is copied to /usr/src/app in the container and npm install is run installing the dependencies specified in package.json.

⁠Customization

The images can be customized by passing build arguments⁠ to docker to docker build. The following arguments can be used:

  • TINI_VERSION the APK version of tini⁠ to install

  • NODEJS_VERSION the APK version of nodejs⁠ to install

  • APP_DIR the directory to install the application to (onbuild only)

Tag summary

Content type

Image

Digest

Size

11.8 MB

Last updated

about 10 years ago

docker pull enil/alpine-node