CICD-057 · Distinguish host DNS from job DNS
Encyclopedia · Gitea runner fundamentals · All snippets
Previous · CICD-056 · Next · CICD-058
1. Where it fits
- Placement Bash run step following checkout, or equivalent lab terminal.
- Prerequisites Gitea Actions enabled, authorized trusted runner registered and local repository checked out when needed.
- Platforms gitea-actions.
- Parameters
GITEA_HOST.
2. Copy the snippet
bash
cat /etc/resolv.conf
getent ahosts "${GITEA_HOST:?}"3. How it works
The resolver configuration inside the executor determines how the hostname is looked up. getent uses the system's configured name-service path.
4. Verify the result
Run in a job and inspect resolver settings. Local multicast DNS commonly differs from container DNS.
Validation syntax-validated (Bash parse). Status definitions.