This commit is contained in:
parent
aeb7adc4e9
commit
be16db9c0b
|
|
@ -25,6 +25,8 @@ steps:
|
||||||
- name: 镜像构建与推送
|
- name: 镜像构建与推送
|
||||||
# 👇 1. 核心:必须换成官方文档指定的 -insecure 后缀镜像
|
# 👇 1. 核心:必须换成官方文档指定的 -insecure 后缀镜像
|
||||||
image: woodpeckerci/plugin-docker-buildx:latest-insecure
|
image: woodpeckerci/plugin-docker-buildx:latest-insecure
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
privileged: true
|
privileged: true
|
||||||
settings:
|
settings:
|
||||||
repo: push.lovestory.cyou/abhors/demo
|
repo: push.lovestory.cyou/abhors/demo
|
||||||
|
|
@ -34,30 +36,6 @@ steps:
|
||||||
from_secret: nexus_docker_username
|
from_secret: nexus_docker_username
|
||||||
password:
|
password:
|
||||||
from_secret: nexus_docker_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:
|
when:
|
||||||
event: push
|
event: push
|
||||||
branch: master
|
branch: master
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue