Skip to content

Instantly share code, notes, and snippets.

@gunar
Created November 5, 2018 19:02
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 gunar/feca8d5f71704630586e739d26aad5b2 to your computer and use it in GitHub Desktop.
Save gunar/feca8d5f71704630586e739d26aad5b2 to your computer and use it in GitHub Desktop.
Dockerfile
FROM alpine:latest
WORKDIR /usr/src/app
RUN apk add --no-cache --update 'nodejs~8' yarn
RUN yarn global add node-gyp
RUN export PATH=$PATH:./node_modules/.bin
# http://bitjudo.com/blog/2014/03/13/building-efficient-dockerfiles-node-dot-js/
ADD package.json yarn.lock ./
RUN yarn install -s --ignore-scripts
ADD . .
RUN yarn build
CMD ["yarn", "start"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment