This commit is contained in:
gxl 2026-06-02 16:39:11 +08:00
parent 04fc507f99
commit 6a0d6a6e25
1 changed files with 4 additions and 1 deletions

View File

@ -15,7 +15,7 @@ steps:
- name: 镜像构建与推送 - name: 镜像构建与推送
image: docker.m.daocloud.io/woodpeckerci/plugin-docker-buildx:latest image: docker.m.daocloud.io/woodpeckerci/plugin-docker-buildx:latest
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock # ⚠️ Docker in Docker 挂载 - /var/run/docker.sock:/var/run/docker.sock
settings: settings:
repo: registry.cn-zhangjiakou.aliyuncs.com/abhors/demo repo: registry.cn-zhangjiakou.aliyuncs.com/abhors/demo
tags: latest tags: latest
@ -24,6 +24,9 @@ steps:
from_secret: aliyun_acr_username from_secret: aliyun_acr_username
password: password:
from_secret: aliyun_acr_password from_secret: aliyun_acr_password
# 👇 核心:为其指定一个绝对能稳定拉取三方大类目的镜像加速源
# 这样当它去找 moby/buildkit 时会自动走大厂的代理通道100% 不会超时
mirror: https://docker.m.daocloud.io
# 很多时候 plugins/docker 内部默认会处理 context不需要你手动挂载 docker.sock # 很多时候 plugins/docker 内部默认会处理 context不需要你手动挂载 docker.sock
# 但需要确保服务器配置了 WOODPECKER_PLUGINS_PRIVILEGED=plugins/docker # 但需要确保服务器配置了 WOODPECKER_PLUGINS_PRIVILEGED=plugins/docker
when: when: