From 23946e72eb976b00e9e5dba49ca45675a7ca1ec0 Mon Sep 17 00:00:00 2001 From: kale Date: Wed, 10 Dec 2025 08:27:42 -0500 Subject: [PATCH] =?UTF-8?q?[fix]:[20251208][drone=20=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E4=BB=93=E5=BA=93=E6=9E=84=E5=BB=BA]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 8 +++++++- docker/Dockerfile | 2 +- docker/Dockerfile-frontend | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index f82a918..5824bda 100644 --- a/.drone.yml +++ b/.drone.yml @@ -93,6 +93,9 @@ volumes: path: /localcache/apps - name: npm-cache path: /localcache/npm-cache + - name: certs + host: + path: /localcache/registry_certs # 你提前放好 ca.crt clone: depth: 0 @@ -146,9 +149,12 @@ steps: image: registry.cn-beijing.aliyuncs.com/yinzy/drone-plugins:docker-latest pull: false settings: + volumes: + - name: certs + path: /etc/docker/certs.d/docker-registry.local:36000/ # 1. 仓库认证信息 registry: - from_secret: local_registry_app_base_url + from_secret: local_registry_base_url username: from_secret: local_registry_user password: diff --git a/docker/Dockerfile b/docker/Dockerfile index 4810781..9afc0fd 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,5 +1,5 @@ # 使用最小的 Java 8 JRE 镜像 -FROM openjdk:8-jre-alpine +FROM docker-registry.local:36000/base/openjdk:8-jre-alpine # 设置工作目录 WORKDIR /app diff --git a/docker/Dockerfile-frontend b/docker/Dockerfile-frontend index df84b9c..ffe79a3 100644 --- a/docker/Dockerfile-frontend +++ b/docker/Dockerfile-frontend @@ -1,5 +1,5 @@ # 前端构建阶段 -FROM registry.cn-beijing.aliyuncs.com/yinzy/node:20.11-alpine3.19 AS builder +FROM docker-registry.local:36000/base/node:20.11-alpine3.19 AS builder WORKDIR /app @@ -15,7 +15,7 @@ COPY vue-ui/ . # RUN npm run build # 运行阶段,使用独立 nginx 镜像 -FROM registry.cn-beijing.aliyuncs.com/yinzy/nginx:alpine-stable AS runtime +FROM docker-registry.local:36000/base/nginx:alpine-stable AS runtime # 清理默认页面 WORKDIR /usr/share/nginx/html