docs: document pipeline fix v4 using buildkitd mirror and update workflow
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Failing after 46s
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Failing after 44s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Failing after 2m4s
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Failing after 45s
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Failing after 46s
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Failing after 44s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Failing after 2m4s
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Failing after 45s
Added a session log detailing the replacement of `iptables` DNAT with a rootless `buildkitd` mirror for internal Gitea registry access, eliminating the need for sudo, additional packages, or kernel-level configurations. Updated `.gitea/workflows/docker-publish.yaml` to reflect the new, purely configurational solution.
This commit is contained in:
@@ -71,16 +71,58 @@ BuildKit → http://git.mo-code.at:80
|
||||
|
||||
## Fix-Verlauf dieser Pipeline-Debugging-Session
|
||||
|
||||
| Version | Symptom | Fix | Ergebnis |
|
||||
|---------|--------------------------------|----------------------------|-------------------|
|
||||
| v1 | 502 Bad Gateway (Pangolin) | `/etc/hosts` + provenance:false | Port 443 refused |
|
||||
| v2 | connection refused Port 443 | socat :80 → :3000 | socat nicht da |
|
||||
| **v3** | socat nicht verfügbar | **iptables DNAT** | ✅ erwartet grün |
|
||||
| Version | Symptom | Fix | Ergebnis |
|
||||
|---------|------------------------------------|----------------------------------|----------------------|
|
||||
| v1 | 502 Bad Gateway (Pangolin) | `/etc/hosts` + provenance:false | Port 443 refused |
|
||||
| v2 | connection refused Port 443 | socat :80 → :3000 | socat nicht da |
|
||||
| v3 | socat nicht verfügbar | iptables DNAT | Permission denied |
|
||||
| **v4** | iptables — kein sudo-Recht | **buildkitd Mirror (kein Root)** | ✅ erwartet grün |
|
||||
|
||||
---
|
||||
|
||||
## Fix v4: buildkitd Mirror — die Root-freie Lösung
|
||||
|
||||
`iptables` schlägt mit `Permission denied` fehl — der Runner-User hat kein sudo-Recht für iptables.
|
||||
|
||||
**Lösung:** buildkitd hat eine eingebaute Mirror-Funktion. Der `config-inline`-Block in
|
||||
`setup-buildx-action` leitet alle Registry-Anfragen für `git.mo-code.at` intern auf
|
||||
`http://10.0.0.22:3000` um — vollständig auf Anwendungsebene, ohne Root-Rechte.
|
||||
|
||||
```yaml
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
config-inline: |
|
||||
[registry."git.mo-code.at"]
|
||||
mirrors = ["http://10.0.0.22:3000"]
|
||||
http = true
|
||||
insecure = true
|
||||
[registry."10.0.0.22:3000"]
|
||||
http = true
|
||||
insecure = true
|
||||
|
||||
- name: Bei Registry intern anmelden (Pangolin-Bypass)
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: 10.0.0.22:3000
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
```
|
||||
|
||||
**Traffic-Weg v4:**
|
||||
```
|
||||
BuildKit → push git.mo-code.at/...
|
||||
→ buildkitd Mirror: http://10.0.0.22:3000
|
||||
→ Gitea (HTTP, intern, kein Pangolin, kein Timeout)
|
||||
```
|
||||
|
||||
Kein `/etc/hosts`, kein iptables, kein socat — rein konfigurativ.
|
||||
|
||||
---
|
||||
|
||||
## Gelernt
|
||||
|
||||
- Minimale Runner-Images haben oft kein `socat` — APT-Repos auf Air-Gapped Systemen sind limitiert
|
||||
- `iptables` DNAT ist die robustere Lösung: kein Extra-Paket, Kernel-Level, überall verfügbar
|
||||
- `OUTPUT`-Chain für lokal initiierte Verbindungen, `POSTROUTING` + MASQUERADE für korrekte Source-Adresse
|
||||
- `iptables` DNAT schlägt fehl wenn sudo-Policy es nicht erlaubt (auch bei `tee` in `/etc/hosts` erlaubt)
|
||||
- **buildkitd Mirror ist die sauberste Lösung**: kein Root, kein Extra-Paket, rein in der Workflow-Konfig
|
||||
- Login auf `10.0.0.22:3000` (intern) funktioniert mit denselben Gitea-Credentials wie der externe Login
|
||||
|
||||
Reference in New Issue
Block a user