Debian Docker images for Node.js with best practices in mind
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
alpine
debian
generated-dockerfiles
.eslintrc
.gitignore
CONTRIBUTING.md
LICENSE
README.md
circle.hbs
index.js
package-lock.json
package.json

README.md

Join Slack CircleCI

docker-node

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

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

Currently supported distributions:

  • Debian
  • Alpine

Usage

Dockerfile

FROM godaddy/node:8.9.4-debian

ENV NODE_ENV=production # or anything else

RUN mkdir /app
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", "node", "npm", "start"]

Docker-entrypoint.sh

#!/bin/sh

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

exec "$@"

Grabbing the images

To grab the images, visit our Docker Hub profile.