This commit is contained in:
gxl 2026-06-03 18:59:51 +08:00
parent aeb7adc4e9
commit be16db9c0b
1 changed files with 2 additions and 24 deletions

View File

@ -25,6 +25,8 @@ steps:
- name: 镜像构建与推送
# 👇 1. 核心:必须换成官方文档指定的 -insecure 后缀镜像
image: woodpeckerci/plugin-docker-buildx:latest-insecure
volumes:
- /var/run/docker.sock:/var/run/docker.sock
privileged: true
settings:
repo: push.lovestory.cyou/abhors/demo
@ -34,30 +36,6 @@ steps:
from_secret: nexus_docker_username
password:
from_secret: nexus_docker_password
# 👇 核心修改 2显式指定构建输出模式为常规 image 模式并直接 push
# 强行把 Buildx 启动时要拉取的镜像,换成你自己的私有仓库(或者是你配置过镜像加速能拉到的地方)
buildkit_driveropt: image=push.lovestory.cyou/moby/buildkit:buildx-stable-1
# 这样可以强行阻止 Buildx 启动独立的隔离容器,从而彻底不走官方下载 moby/buildkit 的代码链
output: type=image,push=true
# 👇 2. 核心:完全对齐官方不安全设置文档,强制 BuildKit 放行纯 HTTP
buildkit_config: |
[registry."push.lovestory.cyou"]
http = true
insecure = true
config: |
{
"registry-mirrors": [
"https://docker.1ms.run",
"https://dockerpull.org",
"https://1ms.run",
"https://docker.1panel.dev/"
],
"insecure-registries": [
"registry.lovestory.cyou",
"push.lovestory.cyou"
]
}
when:
event: push
branch: master