Last active
May 12, 2019 01:46
-
-
Save inductor/a9840e9e289312e9ea33e01a6aceb663 to your computer and use it in GitHub Desktop.
Dockerfile
This file contains 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:10.15.3 as builder | |
WORKDIR /src | |
COPY . . | |
RUN yarn install \ | |
--prefer-offline \ | |
--frozen-lockfile \ | |
--non-interactive \ | |
--production=false | |
RUN yarn build | |
RUN rm -rf node_modules && \ | |
NODE_ENV=production yarn install \ | |
--prefer-offline \ | |
--pure-lockfile \ | |
--non-interactive \ | |
--production=true | |
FROM node:10.15.3-alpine | |
WORKDIR /src | |
COPY --from=builder /src . | |
ENV HOST 0.0.0.0 | |
EXPOSE 3000 | |
CMD [ "yarn", "start" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment