Dockerfile 419 B
FROM node:14.13-alpine3.12 as build
ARG BUILD_REACT_APP_STYLEGUIDE_URL
ENV REACT_APP_STYLEGUIDE_URL=${BUILD_REACT_APP_STYLEGUIDE_URL}
RUN mkdir -p /home/node/cf2021
WORKDIR /home/node/cf2021
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# ---
FROM nginx:alpine as production
COPY --from=build /home/node/cf2021/build /usr/share/nginx/html/
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf