Skip to content

Instantly share code, notes, and snippets.

@saml
Created May 21, 2020 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saml/3c4b985c7f54d8d2d9cc16463752803c to your computer and use it in GitHub Desktop.
Save saml/3c4b985c7f54d8d2d9cc16463752803c to your computer and use it in GitHub Desktop.
FROM mhart/alpine-node:12.2 as builder
# Do crazy stuff
FROM mhart/alpine-node:12.2 as app
WORKDIR /app
RUN apk add --no-cache tini
# Can I use a single COPY?
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package*.json ./
COPY api ./api
COPY lib ./lib
COPY newrelic.js ./
ENTRYPOINT [ "tini", "--" ]
CMD [ "npm", "run", "start" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment