GitLab pipeline stopped working (in public runner)

Hi everyone, I need help.

As of today, my project pipeline has stopped working. I didn’t change anything in its configuration, there were only changes in the project (obviously). I’m using the public gitlab runner.

$ docker login -u lorenzomartini123@gmail.com -p [MASKED] $CI_REGISTRY
[24](https://gitlab.com/lorenzo.martini/vintedsignalr/-/jobs/5759351118#L24)WARNING! Using --password via the CLI is insecure. Use --password-stdin.
[25](https://gitlab.com/lorenzo.martini/vintedsignalr/-/jobs/5759351118#L25)error during connect: Post "http://docker:2375/v1.24/auth": dial tcp: lookup docker on 169.254.169.254:53: no such host
[26](https://gitlab.com/lorenzo.martini/vintedsignalr/-/jobs/5759351118#L26)Cleaning up project directory and file based variables00:00
[27](https://gitlab.com/lorenzo.martini/vintedsignalr/-/jobs/5759351118#L27)ERROR: Job failed: exit code 1

my pipeline:

image: docker:latest
services: 
  - docker:dind

stages:
- build_server
- build_client

build_server:
  stage: build_server
  image: docker:latest
  services: 
    - docker:dind
  before_script:
    - docker login -u lorenzomartini123@gmail.com -p [MASKED] $CI_REGISTRY
  script:
    - docker pull $CI_REGISTRY_IMAGE/server:latest || true
    - >
      docker build
      --pull
      --cache-from $CI_REGISTRY_IMAGE/server:latest
      --label "org.opencontainers.image.title=$CI_PROJECT_TITLE"
      --label "org.opencontainers.image.url=$CI_PROJECT_URL"
      --label "org.opencontainers.image.created=$CI_JOB_STARTED_AT"
      --label "org.opencontainers.image.revision=$CI_COMMIT_SHA"
      --label "org.opencontainers.image.version=$CI_COMMIT_REF_NAME"
      --tag $CI_REGISTRY_IMAGE/server:latest
      --file cicd/DockerfileServer
      .
    - docker push $CI_REGISTRY_IMAGE/server:latest

build_client:
  stage: build_client
  image: docker:latest
  services: 
    - docker:dind
  before_script:
    - docker login -u lorenzomartini123@gmail.com -p [MASKED] $CI_REGISTRY
  script:
    - docker pull $CI_REGISTRY_IMAGE/client:latest || true
    - >
      docker build
      --pull
      --cache-from $CI_REGISTRY_IMAGE/client:latest
      --label "org.opencontainers.image.title=$CI_PROJECT_TITLE"
      --label "org.opencontainers.image.url=$CI_PROJECT_URL"
      --label "org.opencontainers.image.created=$CI_JOB_STARTED_AT"
      --label "org.opencontainers.image.revision=$CI_COMMIT_SHA"
      --label "org.opencontainers.image.version=$CI_COMMIT_REF_NAME"
      --tag $CI_REGISTRY_IMAGE/client:latest
      --file cicd/DockerfileClient
      .
    - docker push $CI_REGISTRY_IMAGE/client:latest

My DockerfileServer (client one is similar):

FROM mcr.microsoft.com/dotnet/sdk:3.1 AS build-env

WORKDIR /app

COPY ../VintedSignalRServer/VintedSignalRServer.csproj ./VintedSignalRServer/
COPY ../Common/Common.csproj ./Common/

RUN dotnet restore ./VintedSignalRServer/VintedSignalRServer.csproj

COPY ../ ./

RUN dotnet publish ./VintedSignalRServer/VintedSignalRServer.csproj -c Release -o out

FROM mcr.microsoft.com/dotnet/aspnet:3.1

WORKDIR /app
EXPOSE 5000
COPY --from=build-env /app/out .

ARG UID=10001
RUN adduser \
    --disabled-password \
    --gecos "" \
    --home "/nonexistent" \
    --shell "/sbin/nologin" \
    --no-create-home \
    --uid "${UID}" \
    appuser
USER appuser

ENTRYPOINT ["dotnet", "VintedSignalRServer.dll"]

I’m experiencing similar problem in this 2 days.
I saw this error in the pipeline:

DOCKER_HOST tcp://docker:2375 is not listening
Could not find a valid Docker environment. Please check configuration. Attempted configurations were:
	UnixSocketClientProviderStrategy: failed with exception InvalidConfigurationException (Could not find unix domain socket). Root cause NoSuchFileException (/var/run/docker.sock)
	DockerDesktopClientProviderStrategy: failed with exception NullPointerException (Cannot invoke "java.nio.file.Path.toString()" because the return value of "org.testcontainers.dockerclient.DockerDesktopClientProviderStrategy.getSocketPath()" is null)As no valid configuration was found, execution cannot continue.
See https://www.testcontainers.org/on_failure.html for more details.
Unable to connect to DOCKER_HOST URI %s, make sure Docker is running on the specified host

I don’t know if you are the same problem, but I see that in the Gitlab status page (https://status.gitlab.com) it say that we need to downgrade docker image in the pipeline.
We’re trying just now…

[EDIT]
I confirm that this modification should work:

You need to replace

  services: 
    - docker:dind

with

  services: 
    - docker:24.0.6-dind
2 Likes

We are currently investigating why jobs using the docker:24.0.7-dind service fail with this error message. Something appears to have changed in the latest docker:dind image related to networking, possibly related to Switch over to xtables-legacy when nf_tables module isn't available (… · docker-library/docker@7ac5702 · GitHub.

Until this is resolved, one can workaround this issue by using docker:24.0.6-dind image.