Created
August 19, 2019 13:39
-
-
Save TheMagoo73/0c22e8978cafcc450b86d085032859b6 to your computer and use it in GitHub Desktop.
Example dockerfile for React and NGINX
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:11.1.0-alpine as build | |
WORKDIR /app | |
COPY package*.json /app/ | |
RUN npm install | |
COPY ./ /app/ | |
RUN npm run build | |
FROM nginx:1.15.8-alpine | |
COPY --from=build /app/build /usr/share/nginx/html | |
COPY --from=build /app/nginx/nginx.conf /etc/nginx/nginx.conf | |
EXPOSE 80 | |
ENTRYPOINT [ "nginx", "-g", "daemon off;" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment