Skip to content

Instantly share code, notes, and snippets.

@jkinkead
Last active July 5, 2019 20:33
Show Gist options
  • Save jkinkead/91971b2a30f366551b489f0d09f0844f to your computer and use it in GitHub Desktop.
Save jkinkead/91971b2a30f366551b489f0d09f0844f to your computer and use it in GitHub Desktop.
Simple Dockerfile using npm
FROM node:12.5.0-stretch-slim
# Install tini, per best-practices. See:
# https://github.com/nodejs/docker-node/blob/master/docs/BestPractices.md#handling-kernel-signals
ARG TINI_VERSION=v0.18.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]
WORKDIR /app
# Install dependencies.
COPY package.json package-lock.json ./
RUN npm ci
# Install application.
COPY src src
CMD ["node", "src/app.js"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment