Skip to content

Debian Docker images for Node.js with best practices in mind

License

Notifications You must be signed in to change notification settings

gshively11/docker-node

 
 

Repository files navigation

CircleCI

docker-node

Debian Docker images for Node.js with best practices in mind:

  • proper signal-forwarding for su and sudo,
  • using unprivileged users for running apps.

Usage

Dockerfile

FROM godaddy/node:8.9.4-debian

ENV NODE_ENV=production # or anything else

WORKDIR /app
COPY docker/.npmrc package.json package-lock.json /app/

RUN npm install

# Copy app to source directory
COPY docker/docker-entrypoint.sh /docker-entrypoint.sh
COPY . /app

EXPOSE 8080
CMD ["gosu", "alone", "npm", "start"]

Docker-entrypoint.sh

#!/bin/sh

# here you can customize how your app should start up
set -e

cd /app
chown alone:alone /app
exec "$@"

Grabbing the images

To grab the images, visit our Docker Hub profile.

About

Debian Docker images for Node.js with best practices in mind

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 59.5%
  • Shell 28.0%
  • HTML 12.5%