Fix CI image build failures on runners with isolated DinD DNS #42

Merged
brian merged 1 commits from fix/ci-image-build-dns into main 2026-07-10 09:19:14 +02:00
Owner

Summary

The ci-image.yml build was failing because the DinD build environment could not resolve deb.debian.org, so apt install docker.io failed and python-repositories-ci:latest was never published. That blocked PRs using runs-on: python-repositories-ci.

  • Copy the Docker CLI from docker:27-cli instead of installing docker.io via apt (only the CLI is needed for testcontainers)
  • Add --network=host to docker build in the workflow and build-ci-image.sh so builds use the host DNS resolver

Test plan

  • Merge to main
  • Run Build CI Image (workflow_dispatch) and confirm it completes successfully
  • Verify gitea.lille-vemmelund.dk/brian/python-repositories-ci:latest exists in the registry
  • Re-run the blocked python-repositories-ci PR workflows
  • If needed, restart homelab-cluster-gitea-runner-0 to clear the DinD RWLayer error
## Summary The `ci-image.yml` build was failing because the DinD build environment could not resolve `deb.debian.org`, so `apt install docker.io` failed and `python-repositories-ci:latest` was never published. That blocked PRs using `runs-on: python-repositories-ci`. - Copy the Docker CLI from `docker:27-cli` instead of installing `docker.io` via apt (only the CLI is needed for testcontainers) - Add `--network=host` to `docker build` in the workflow and `build-ci-image.sh` so builds use the host DNS resolver ## Test plan - [ ] Merge to `main` - [ ] Run **Build CI Image** (`workflow_dispatch`) and confirm it completes successfully - [ ] Verify `gitea.lille-vemmelund.dk/brian/python-repositories-ci:latest` exists in the registry - [ ] Re-run the blocked `python-repositories-ci` PR workflows - [ ] If needed, restart `homelab-cluster-gitea-runner-0` to clear the DinD `RWLayer` error
brian added 1 commit 2026-07-10 09:16:54 +02:00
Fix CI image build failures on runners with isolated DinD DNS.
PR Title Check / check-title (pull_request) Successful in 8s
Test Python Package / unit-tests (pull_request) Successful in 17s
Code Quality Pipeline / code-quality (pull_request) Successful in 51s
Test Python Package / integration-tests (pull_request) Successful in 1m40s
Test Python Package / coverage-report (pull_request) Successful in 17s
f3b6cdbc9e
Copy the Docker CLI from the official image instead of apt, and use
--network=host during docker build so apt and layer pulls can resolve
external registries on standalone runners.

Co-authored-by: Cursor <cursoragent@cursor.com>
Member

Test Coverage Report:

Name                                                            Stmts   Miss    Cover   Missing
-----------------------------------------------------------------------------------------------
python_repositories/__init__.py                                    12      0  100.00%
python_repositories/adapters/__init__.py                           13      0  100.00%
python_repositories/adapters/connection_aware_adapter.py           61      0  100.00%
python_repositories/adapters/minio_adapter.py                     117      0  100.00%
python_repositories/adapters/redis_adapter.py                     105      0  100.00%
python_repositories/config/__init__.py                              4      0  100.00%
python_repositories/config/dotenv_loader.py                         7      0  100.00%
python_repositories/config/env_bool.py                             14      0  100.00%
python_repositories/config/minio_config.py                         21      0  100.00%
python_repositories/config/redis_config.py                         14      0  100.00%
python_repositories/examples/__init__.py                            0      0  100.00%
python_repositories/examples/artifact_object_repository.py          9      0  100.00%
python_repositories/examples/user_json_repository.py               11      0  100.00%
python_repositories/interfaces/__init__.py                          5      0  100.00%
python_repositories/interfaces/connection_aware_interface.py        8      0  100.00%
python_repositories/interfaces/context_aware_interface.py           8      0  100.00%
python_repositories/interfaces/json_repository_interface.py        15      0  100.00%
python_repositories/interfaces/object_repository_interface.py      11      0  100.00%
-----------------------------------------------------------------------------------------------
TOTAL                                                             435      0  100.00%

**Test Coverage Report:** ``` Name Stmts Miss Cover Missing ----------------------------------------------------------------------------------------------- python_repositories/__init__.py 12 0 100.00% python_repositories/adapters/__init__.py 13 0 100.00% python_repositories/adapters/connection_aware_adapter.py 61 0 100.00% python_repositories/adapters/minio_adapter.py 117 0 100.00% python_repositories/adapters/redis_adapter.py 105 0 100.00% python_repositories/config/__init__.py 4 0 100.00% python_repositories/config/dotenv_loader.py 7 0 100.00% python_repositories/config/env_bool.py 14 0 100.00% python_repositories/config/minio_config.py 21 0 100.00% python_repositories/config/redis_config.py 14 0 100.00% python_repositories/examples/__init__.py 0 0 100.00% python_repositories/examples/artifact_object_repository.py 9 0 100.00% python_repositories/examples/user_json_repository.py 11 0 100.00% python_repositories/interfaces/__init__.py 5 0 100.00% python_repositories/interfaces/connection_aware_interface.py 8 0 100.00% python_repositories/interfaces/context_aware_interface.py 8 0 100.00% python_repositories/interfaces/json_repository_interface.py 15 0 100.00% python_repositories/interfaces/object_repository_interface.py 11 0 100.00% ----------------------------------------------------------------------------------------------- TOTAL 435 0 100.00% ```
brian merged commit 24126e4044 into main 2026-07-10 09:19:14 +02:00
brian deleted branch fix/ci-image-build-dns 2026-07-10 09:19:14 +02:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lille-vemmelund/python-repositories#42