wangliang hace 2 meses
padre
commit
4bb07f9b32
Se han modificado 1 ficheros con 3 adiciones y 4 borrados
  1. 3 4
      web/conf/Dockerfile

+ 3 - 4
web/conf/Dockerfile

@@ -2,7 +2,7 @@ FROM node:18 AS build-stage
 ENV TZ Asia/Shanghai
 MAINTAINER wangliang@qmth.com.cn
 
-WORKDIR /app
+WORKDIR /opt
 COPY . .
 RUN npm config set registry http://registry.cnpmjs.org && npm config set registry http://registry.npm.taobao.org
 RUN npm install
@@ -13,9 +13,8 @@ ENV TZ Asia/Shanghai
 MAINTAINER wangliang@qmth.com.cn
 
 WORKDIR /opt
-ARG CONF_NAME
 RUN rm /etc/nginx/conf.d/default.conf
-COPY --from=build-stage /app/dist /opt/dist
-COPY ./$CONF_NAME /etc/nginx/conf.d/$CONF_NAME
+COPY --from=build-stage /opt/dist /opt/dist
+COPY ./app.conf /etc/nginx/conf.d/app.conf
 
 CMD ["nginx","-g","daemon off;"]