FROM node:16-buster as build WORKDIR /workspace COPY package.json . RUN npm install --force --registry=https://registry.npm.taobao.org ADD . /workspace RUN npm run build:txtest 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/ /index.html;\n\ }\n\ }\n\ " > /etc/nginx/conf.d/default.conf