fix: give dind configurable dns resolvers #2

Merged
ivuorinen merged 1 commit from fix/dind-dns into main 2026-09-26 00:15:30 +00:00
Owner

Image builds in fiximus-maximus jobs (#170) failed to resolve registry-1.docker.io.

Cause: containers inside DinD can't use Docker's embedded DNS, so dockerd hands them its fallback resolvers, 8.8.8.8 and 8.8.4.4, which this host can't reach. That includes job containers and BuildKit's builder. I confirmed this on the deployed DinD: a nested container gets nameserver 8.8.8.8 / 8.8.4.4 and fails to resolve registry-1.docker.io. With --dns 185.12.64.1 --dns 185.12.64.2 it resolves.

Change:

  • compose.yaml: dockerd gets --dns ${DIND_DNS_1:-185.12.64.1} --dns ${DIND_DNS_2:-185.12.64.2}, Hetzner's resolvers by default.
  • .env.example and README.md: both variables documented, plus a troubleshooting row.
  • tests/compose.test.sh: checks the default resolvers and that overrides reach dockerd.

Verification: sh tests/compose.test.sh 13/13, shellcheck clean. README, compose.yaml and .env.example agree on all 12 variables. The test was run and seen to fail before the change.

After merge: redeploy the Coolify resource, which recreates the dind container with the new flags, then re-run #170's Docker jobs.

Image builds in fiximus-maximus jobs (#170) failed to resolve `registry-1.docker.io`. **Cause:** containers inside DinD can't use Docker's embedded DNS, so dockerd hands them its fallback resolvers, 8.8.8.8 and 8.8.4.4, which this host can't reach. That includes job containers and BuildKit's builder. I confirmed this on the deployed DinD: a nested container gets `nameserver 8.8.8.8` / `8.8.4.4` and fails to resolve `registry-1.docker.io`. With `--dns 185.12.64.1 --dns 185.12.64.2` it resolves. **Change:** - `compose.yaml`: dockerd gets `--dns ${DIND_DNS_1:-185.12.64.1} --dns ${DIND_DNS_2:-185.12.64.2}`, Hetzner's resolvers by default. - `.env.example` and `README.md`: both variables documented, plus a troubleshooting row. - `tests/compose.test.sh`: checks the default resolvers and that overrides reach dockerd. **Verification:** `sh tests/compose.test.sh` 13/13, shellcheck clean. README, `compose.yaml` and `.env.example` agree on all 12 variables. The test was run and seen to fail before the change. **After merge:** redeploy the Coolify resource, which recreates the `dind` container with the new flags, then re-run #170's Docker jobs.
Containers inside DinD cannot use Docker's embedded DNS, so dockerd
falls back to 8.8.8.8/8.8.4.4, which this host cannot reach. Image
builds in jobs then fail to resolve registry-1.docker.io. DIND_DNS_1
and DIND_DNS_2 default to Hetzner's resolvers.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ivuorinen/coolify-forgejo-runners!2
No description provided.