Created
December 8, 2017 11:38
-
-
Save MikeMichel/73b6ed531d0ba9b43409c5f4a49b8b1b 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
FROM node:8-alpine as builder | |
WORKDIR /usr/src/app | |
COPY package.json package-lock.json ./ | |
RUN npm install --only=production --silent | |
COPY public public/ | |
COPY src src/ | |
COPY scripts scripts/ | |
COPY config config/ | |
# RUN npm run build | |
RUN yarn build | |
## 2nd stage | |
FROM nginx:1.13.6-alpine | |
COPY nginx.conf /etc/nginx/nginx.conf | |
COPY --from=builder /usr/src/app/build /usr/share/nginx/html/ | |
COPY --from=builder /usr/src/app/build/index.html /usr/share/nginx/index-template.html | |
COPY nginx-entrypoint.sh / | |
ENTRYPOINT ["sh", "/nginx-entrypoint.sh"] | |
CMD ["nginx"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment