Created
March 10, 2019 17:51
-
-
Save thejungwon/ce8e72655d6da7a5ba3a955503fc0801 to your computer and use it in GitHub Desktop.
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
# build environment | |
FROM node:9.6.1 as builder | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
ENV PATH /usr/src/app/node_modules/.bin:$PATH | |
COPY package.json /usr/src/app/package.json | |
RUN npm install --silent | |
RUN npm install react-scripts@1.1.1 -g --silent | |
COPY . /usr/src/app | |
RUN npm run build | |
# production environment | |
FROM nginx:1.13.9-alpine | |
COPY --from=builder /usr/src/app/build /usr/share/nginx/html | |
EXPOSE 80 | |
CMD ["nginx", "-g", "daemon off;"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment