Created
August 3, 2022 17:48
-
-
Save ccavazos/b13efd198e900e362abba42bccd6f846 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
# Builder | |
FROM node:14.16.0-alpine as build | |
WORKDIR /app | |
ENV PATH /app/node_modules/.bin:$PATH | |
COPY package.json ./ | |
COPY yarn.lock ./ | |
RUN yarn install --frozen-lockfile | |
RUN npm install react-scripts@3.4.1 -g | |
COPY . ./ | |
RUN yarn build | |
# Runner | |
FROM nginx:stable-alpine as release | |
COPY --from=build /app/build /usr/share/nginx/html | |
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf | |
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