Created
April 3, 2018 14:02
-
-
Save lucasdu4rte/6205c0aa46c0a4b3e6435b0ac80bd33d to your computer and use it in GitHub Desktop.
Dockerfile Node.js and simple server http
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
| ### STAGE 1: Build ### | |
| FROM node:9-alpine | |
| RUN yarn global add serve | |
| WORKDIR /usr/src/app | |
| COPY package.json yarn.lock ./ | |
| RUN yarn | |
| COPY . ./ | |
| RUN yarn build | |
| # Serve with serve ;) | |
| CMD ["serve", "-p", "8080"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment