Shell_Casing

dockerizing react

Sep 4th, 2020
525
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. FROM ubuntu AS build
  2. WORKDIR /src
  3.  
  4. # Clone the latest source
  5. RUN git -c http.sslVerify=false clone https://github.com***/**/reactproject.git
  6. WORKDIR /src/app
  7.  
  8. # Checkout the master branch -- no action needed as its default branch
  9.  
  10. RUN npm install
  11. RUN npm run build-test
  12.  
  13. # stage: 2 — the production environment
  14. FROM nginx:alpine
  15. COPY --from=build /src/app/default.conf /etc/nginx/conf.d
  16. COPY --from=build /src/app/build /usr/share/nginx/html
  17. EXPOSE 80
  18. CMD ["nginx", "-g", "daemon off;"]
Add Comment
Please, Sign In to add comment