Created
February 25, 2019 15:20
-
-
Save kalasjocke/e3963e7d0c8d2520dddd4524eadad287 to your computer and use it in GitHub Desktop.
Dockerfile with node dependency management
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: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