-
-
Save rossmaclean/23b4b7fa85e6a6cd79a0de3d30298481 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:13.12.0-alpine as build | |
WORKDIR /app | |
ENV PATH /app/node_modules/.bin:$PATH | |
COPY package.json ./ | |
COPY package-lock.json ./ | |
RUN npm ci --silent | |
RUN npm install react-scripts@3.4.1 -g --silent | |
COPY . ./ | |
RUN npm run build | |
# production environment | |
FROM nginx:stable-alpine | |
COPY --from=build /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