Last active
July 5, 2019 20:33
-
-
Save jkinkead/91971b2a30f366551b489f0d09f0844f to your computer and use it in GitHub Desktop.
Simple Dockerfile using npm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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