From 20e698e74b3ebbb7ceb718f69a4b4e8fb2c84ce8 Mon Sep 17 00:00:00 2001 From: CH3CHO Date: Sun, 6 Jul 2025 16:58:16 +0800 Subject: [PATCH 1/2] feat: Use an image hosted in AliCloud ACR as the base image --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fef6cbe..aa1c6f1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ # 构建阶段:处理插件和元数据 +# FROM python:3.11-alpine AS builder FROM higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/python:3.11-alpine AS builder # 安装系统依赖 @@ -26,7 +27,8 @@ COPY pull_plugins.py plugins.properties ./ RUN python3 pull_plugins.py # 运行阶段:最终镜像 -FROM docker.io/nginx:alpine +# FROM nginx:alpine +FROM higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/nginx:alpine # 从构建阶段复制生成的文件 COPY --from=builder /workspace/plugins /usr/share/nginx/html/plugins From 3e9865aff6a4b013fbb6a4a605d53f62e47fec16 Mon Sep 17 00:00:00 2001 From: CH3CHO Date: Sun, 6 Jul 2025 17:07:09 +0800 Subject: [PATCH 2/2] fix per lingma advice --- Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index aa1c6f1..1615b5b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,8 @@ # 构建阶段:处理插件和元数据 -# FROM python:3.11-alpine AS builder -FROM higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/python:3.11-alpine AS builder +ARG PYTHON_IMAGE=higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/python:3.11-alpine +ARG NGINX_IMAGE=higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/nginx:alpine + +FROM $PYTHON_IMAGE AS builder # 安装系统依赖 RUN apk add --no-cache \ @@ -27,8 +29,7 @@ COPY pull_plugins.py plugins.properties ./ RUN python3 pull_plugins.py # 运行阶段:最终镜像 -# FROM nginx:alpine -FROM higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/nginx:alpine +FROM $NGINX_IMAGE # 从构建阶段复制生成的文件 COPY --from=builder /workspace/plugins /usr/share/nginx/html/plugins