GitLab runner/Docker executor 'Cannot link to a non running container'

Hello everyone,

We use GitLab on GitLab.com in combination with self-hosted GitLab runners, that run on a Windows 11 machine. For one of our Python projects, we use a daily scheduled build to build a Docker image that is used for testing commits during the day. So when tests are being run, the pre-built image is pulled from GitLab.com and tests are run on the image, saving a lot of Docker building and time. For the last few months this worked as expected. However, last week our builds started failing with the following message:

There have been no changes to our GitLab yml, nor to our GitLab runners nor their configuration.

I already tried restarting our build server (making sure Docker Desktop restarted correctly and is up-and-running)

I also followed advice from somewhere else on this forum (Gitlab Shared Runner, ERROR: Cannot Link to a non running container), mentioning that I could update the DOCKER_DRIVER variable with the overlay2 value. But this did not help.

This is our current .gitlab-ci.yml:

default:
  image: docker:24.0.6
  tags:
    - CBS_MDR_PYTHON
  services:
    - docker:24.0.6-dind
  before_script:
    # - docker info

# Note that environment variables can be set in several places
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
variables:
  # When using dind service, you must instruct docker to talk with the
  # daemon started inside of the service. The daemon is available with
  # a network connection instead of the default /var/run/docker.sock socket.
  #
  # The 'docker' hostname is the alias of the service container as described at
  # https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#accessing-the-services
  #
  # If you're using GitLab Runner 12.7 or earlier with the Kubernetes executor and Kubernetes 1.6 or earlier,
  # the variable must be set to tcp://localhost:2375 because of how the
  # Kubernetes executor connects services to the job container
  # DOCKER_HOST: tcp://localhost:2375
  # 
  DOCKER_HOST: tcp://docker:2375
  #
  # This instructs Docker not to start over TLS.
  DOCKER_TLS_CERTDIR: ""

stages:
  - setup
  - test

build image:
  tags:
      - CBS_MDR_PYTHON
  stage: setup
  rules:
    # See this project's GitLab page's CI/CD schedules for te actual schedule
    - if: $CI_PIPELINE_SOURCE == "schedule"
  script:
    - echo $CI_REGISTRY_PASSWORD
    - echo $CI_REGISTRY_USER
    - echo $CI_REGISTRY
    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
    - docker build -t $CI_REGISTRY_IMAGE .
    - docker push $CI_REGISTRY_IMAGE
    - echo "$CI_REGISTRY_IMAGE"

run tests:
  # Better use hard-coded image version, but we can use $CI_REGISTRY_IMAGE
  image: $CI_REGISTRY_IMAGE
  services:
    - docker:dind
  tags:
    - CBS_MDR_PYTHON
  stage: test
  rules:
    # See this project's GitLab page's CI/CD schedules for te actual schedule
    - if: $CI_PIPELINE_SOURCE != "schedule"
  script:
    - echo "GitLab CI/CD is running tests..."
    - python --version
    - pytest --version
    - pwd
    - ls -las
    - /opt/venv/bin/python ./CT/tests/read_DICOM_nifti_tests.py
    - /opt/venv/bin/pytest ./CT/tests/test_file_watcher.py