FROM node:16 AS builder WORKDIR /app # Copy all files from current directory to working dir in image COPY package*.json /app/ RUN npm install COPY ./ /app/ ENV REACT_APP_BASE_API_URL="https://trampa-api-test.dilig.net/" RUN npm run build FROM nginx:alpine WORKDIR /usr/share/nginx/html RUN rm -rf ./* COPY --from=builder /app/build . COPY nginx.conf /etc/nginx/conf.d/default.conf # Containers run nginx with global directives and daemon off ENTRYPOINT ["nginx", "-g", "daemon off;"]