route registry traffic locally and re-enable kaniko cache

Build/deploy were hairpinning image layers through the public IP (registry.woni.link -> 47.100.75.125) despite the registry living on the same host. Add extra_hosts so the build pushes via the host internal IP, and re-enable kaniko cache now that host OOM is mitigated (swap + agent mem cap). Host /etc/hosts pins registry.woni.link to 127.0.0.1 for deploy pulls.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
jianxinandClaude Opus 4.8 committed 2026-06-04 17:17:06 +08:00
1 parent e3bf9749f9
commit 7b344356cc
1 file changed
+5
+5
View File
@@ -8,6 +8,9 @@ when:
steps:
- name: build
image: woodpeckerci/plugin-kaniko
# 把 registry 域名指到宿主机内网 IP, 镜像层推送走本地不绕公网
extra_hosts:
- "registry.woni.link:172.19.152.186"
settings:
username:
from_secret: registry_username
@@ -16,6 +19,8 @@ steps:
tags: latest
repo: woni/office-xbot-feishu
registry: registry.woni.link
cache: true
cache_repo: woni/office-xbot-feishu-cache
mirrors:
- 5c492fmo.mirror.aliyuncs.com
dockerfile: ./Dockerfile