Skip to content

Instantly share code, notes, and snippets.

@kalasjocke
Created February 25, 2019 15:20
Show Gist options
  • Save kalasjocke/e3963e7d0c8d2520dddd4524eadad287 to your computer and use it in GitHub Desktop.
Save kalasjocke/e3963e7d0c8d2520dddd4524eadad287 to your computer and use it in GitHub Desktop.
Dockerfile with node dependency management
FROM node:8.15.0-alpine
ENV NODE_ENV=development
RUN mkdir /usr/dependencies
COPY package.json /usr/dependencies
COPY yarn.lock /usr/dependencies
WORKDIR /usr/dependencies
RUN yarn
ENV NODE_PATH=/usr/dependencies/node_modules
RUN mkdir /usr/app
WORKDIR /usr/app
COPY . .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment