FROM node:14-buster as build WORKDIR /workspace COPY package.json . RUN npm install ADD . /workspace RUN npm run build:prod FROM nginx:mainline WORKDIR /usr/share/nginx/html COPY --from=build /workspace/build /usr/share/nginx/html/dag RUN echo "\ server {\n\ listen 80;\n\ listen [::]:80;\n\ \n\ root /usr/share/nginx/html/dag;\n\ index index.html index.htm;\n\ \n\ location / {\n\ try_files \$uri \$uri/ =404;\n\ }\n\ }\n\ " > /etc/nginx/conf.d/default.conf