Sign inSign up

zephinzer/node

By zephinzer

•Updated over 6 years ago

Image
0

5.7K

zephinzer/node repository overview

⁠Node Image

This is a development and production image for Node.

Canonical documentation at https://github.com/zephinzer/docker-images⁠

⁠Additional Tooling

⁠Additional Tooling in Development

  • Bash for ease of debugging
  • Curl for sending HTTP messages
  • Git for pulling and pushing repositories

⁠Example Usage

The following example is also available in the example directory⁠.

⁠Dockerfile
FROM zephinzer/node:8.11.4-alpine-dev
ARG USER_ID=1000
USER ${USER_ID}
WORKDIR /app
COPY ./package.json /app/package.json
RUN npm install
COPY . /app
ENTRYPOINT [ "nodemon", "src/main.js" ]

Then build it with:

docker build --build-arg USER_ID=$(id -u $(whoami)) -t app .

In example directory: make build

⁠Install dependencies
docker run -v "$(pwd)/src:/app/src" --entrypoint=npm app install;

In example directory: make init

⁠Developing with live-reload
docker run -v "$(pwd)/src:/app/src" app nodemon src/main.js;

In example directory: make run

Tag summary

Content type

Image

Digest

Size

74.8 MB

Last updated

over 6 years ago

docker pull zephinzer/node:4.9.1-dev