Explorar el Código

从官方拉nginx镜像

lxylxy123321 hace 1 semana
padre
commit
83f7ef2f93
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      frontend/Dockerfile

+ 3 - 1
frontend/Dockerfile

@@ -1,4 +1,6 @@
-FROM docker.xuanyuan.me/library/nginx:1.27-alpine
+# 单阶段构建:直接使用已有的 nginx 镜像
+# 从 Docker Hub 拉取(通过 daemon.json 配置的镜像加速器)
+FROM nginx:alpine
 
 COPY dist/ /usr/share/nginx/html/
 COPY nginx.conf /etc/nginx/conf.d/default.conf