This commit is contained in:
parent
e51e622a61
commit
10bfa3e278
|
|
@ -22,9 +22,15 @@ steps:
|
|||
event: [push, pull_request]
|
||||
branch: master
|
||||
|
||||
- name: 官方标准构建与推送 (DinD)
|
||||
- name: 官方标准构建与推送 (宿主机物理硬缓存版)
|
||||
image: woodpeckerci/plugin-docker-buildx:latest-insecure
|
||||
privileged: true
|
||||
# 💡 核心外挂 1:把宿主机的 docker.sock 和 buildx 缓存目录直接挂载进来!
|
||||
# 这样插件在执行命令时,直接吃的是你服务器本地已经下载好的镜像,绝不联网,0秒结束
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /var/lib/docker:/var/lib/docker
|
||||
- /root/.docker:/root/.docker
|
||||
settings:
|
||||
repo: push.lovestory.cyou/abhors/demo
|
||||
registry: push.lovestory.cyou
|
||||
|
|
@ -35,18 +41,16 @@ steps:
|
|||
from_secret: nexus_docker_password
|
||||
output: type=image,push=true
|
||||
|
||||
# 💡 官方高级设置:唯一承认的加速器参数,名字就叫 mirror
|
||||
# 这行会让插件拼接出 dockerd --registry-mirror=... 从而秒拉底座,不再超时
|
||||
mirror: http://registry.lovestory.cyou
|
||||
|
||||
# 💡 内部 BuildKit 编译器的加速器配置
|
||||
# 确保第二步解析 Dockerfile 里的 FROM 基础镜像时走国内源
|
||||
# 内部编译器只认你的内网私服,彻底断绝外网
|
||||
buildkit_config: |
|
||||
[registry."docker.io"]
|
||||
mirrors = ["docker.1ms.run", "dockerpull.org", "1ms.run"]
|
||||
mirrors = ["registry.lovestory.cyou"]
|
||||
[registry."push.lovestory.cyou"]
|
||||
http = true
|
||||
insecure = true
|
||||
[registry."registry.lovestory.cyou"]
|
||||
http = true
|
||||
insecure = true
|
||||
when:
|
||||
event: push
|
||||
branch: master
|
||||
|
|
|
|||
Loading…
Reference in New Issue