This is a development and production image for Node.
Canonical documentation at https://github.com/zephinzer/docker-images
The following example is also available in the example directory.
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
docker run -v "$(pwd)/src:/app/src" --entrypoint=npm app install;
In example directory:
make init
docker run -v "$(pwd)/src:/app/src" app nodemon src/main.js;
In example directory:
make run
Content type
Image
Digest
Size
74.8 MB
Last updated
over 6 years ago
docker pull zephinzer/node:4.9.1-dev