Docker daemon not running on windows shared runner

I’m running a CI-Pipline under a windows shared runner on gitlab. The pipline tries to start a docker container from my gitlab docker registry. But it’s failing with the hint, that maybe the docker daemon is not running. So I modified my job definition to just run “docker info” to validate the environment.

The job is very basic for test:

windowsinstaller:
  stage: deploy
  tags: [ windows ]
  script:
    - docker info

The jobs starts running, gitlab is creating the new vm, here the shortened output:

Running with gitlab-runner 15.8.2 (4d1ca121)
  on windows-shared-runners-manager Hs8mheX5, system ID: s_1a31f6141cb7
Resolving secrets
Preparing the "custom" executor
Using Custom executor with driver autoscaler 0.1.0 (495ee7a)...
Creating virtual machine for the job...
Virtual machine created!
Preparing environment
Running on PACKER-640A4C20 via 
runner-wsrm-3929188350...

$ docker info
Client:
 Debug Mode: false
 Plugins:
  cluster: Manage Mirantis Container Cloud clusters (Mirantis Inc., v1.9.0)
Server:
ERROR: error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/info: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

Any idea, why the docker daemon is not running? In my opinion this should be provided by the shared runner of gitlab.

I’m looking forward to your answers, hoping the best :smiley:

Gerhard

I encountered the same error when executing docker login, which worked fine before updated to 15.8.2

I found a solution:

  before_script:
    - Start-Service -Name "docker"
    - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY

Seems like docker service is not longer started in the shared runner.

1 Like