Files
stack/dev
kert bbc1c5431f
Some checks failed
Deploy / build (push) Successful in 1m13s
CI / lint-test (push) Successful in 1m21s
Deploy / scan (push) Failing after 2m1s
Deploy / report-vulns (push) Has been skipped
fix scan: trivy scans local Docker images, not registry
Root cause analysis (5 whys):
1. Trivy scan fails → can't pull image from gitea:3000
2. Can't resolve gitea → docker run trivy creates a sibling
   container that inherits host DNS, not Docker network DNS
3. Host DNS can't resolve gitea → host is not on any Docker network
4. Why use the registry at all? → we already have the image locally
5. Why not scan local images? → no reason not to

Fix: install trivy as a native binary in the job container,
scan local/NAME:build which exists in the host daemon's image
store (accessible via the mounted Docker socket). No registry
pull, no DNS resolution, no Docker-in-Docker.

Complete daemonless registry architecture:
- docker build: host socket (local build, no registry)
- crane push: job container DNS (daemonless push to gitea:3000)
- trivy scan: local Docker images (no registry pull)
2026-03-23 23:14:11 -04:00
..