From c2804c3b484542f3199e95ea54fd839e0e8ff1a2 Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Tue, 24 Nov 2026 08:02:55 +0000 Subject: [PATCH] fix(molecule): give the driver's connection plugin the host's docker CLI community.docker.docker connects to each instance with the docker CLI, which the ci image does not carry. Assisted-by: Claude Code --- .gitea/workflows/molecule.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/molecule.yml b/.gitea/workflows/molecule.yml index 8c9ec10..e2395d7 100644 --- a/.gitea/workflows/molecule.yml +++ b/.gitea/workflows/molecule.yml @@ -135,14 +135,17 @@ jobs: # As the runner user, with the socket's group, so nothing in the job tree is left # root-owned; HOME (ansible's temp and caches) is in the job tree too. The user has no - # passwd entry in the image, so USER names it. + # passwd entry in the image, so USER names it. The driver's connection plugin + # (community.docker.docker) runs the docker CLI, which the image lacks: the host's goes in. ac_root="$(cd ../../.. && pwd)" sock_gid="$(stat -c %g /var/run/docker.sock)" + docker_cli="$(readlink -f "$(command -v docker)")" mkdir -p "$ac_root/home" docker run --rm -i --init --name "$RUN_CONTAINER" \ --label "net.rkdr.mortis.molecule-run=$RUN_CONTAINER" \ --user "$(id -u):$(id -g)" --group-add "$sock_gid" \ - -v /var/run/docker.sock:/var/run/docker.sock -v "$ac_root:$ac_root" -w "$PWD" \ + -v /var/run/docker.sock:/var/run/docker.sock -v "$docker_cli:/usr/local/bin/docker:ro" \ + -v "$ac_root:$ac_root" -w "$PWD" \ -e "AC_ROOT=$ac_root" -e "HOME=$ac_root/home" -e "USER=$(id -un)" \ -e MOLECULE_IMAGE -e MOLECULE_IMAGE_2604 \ "$CI_IMAGE" scripts/run_molecule_in_ci_image.sh <<< "$selected"