| Dockerfile | ●●●●● patch | view | raw | blame | history | |
| docker-compose.yml | ●●●●● patch | view | raw | blame | history |
Dockerfile
@@ -14,4 +14,14 @@ RUN npm run build-only # 查看 RUN ls /app/dist RUN ls /app/dist # 创建一个新的镜像阶段,用于最终镜像的构建 FROM alpine:latest AS final-image # 创建一个目录来存放打包后的文件 RUN mkdir -p /app/dist-final # 将构建阶段中的打包文件拷贝到最终镜像的指定目录 # 注意:这里使用了 `--from=build-env` 来引用前面的构建阶段 COPY --from=build-env /app/dist /app/dist-final docker-compose.yml
@@ -6,5 +6,4 @@ ports: - "8310:80" volumes: - /software/service/drone/web/pilot-h5:/app/dist restart: always - /software/service/drone/web/pilot-h5:/app/dist-final