Accessing services with "docker run" in job

I want to use docker run inside my job to access services. I followed the description from Services | GitLab.

The error message that I get is:

$ docker run --rm --network=host mariadb mysql -u root -proot -h mariadb root

[63](---)docker: error during connect: Post http://docker:2375/v1.40/containers/create: dial tcp: lookup docker on 127.0.0.11:53: server misbehaving.

[64](---)See 'docker run --help'.

I am running GitLab with docker-compose on version 14.9.

The job is this:

stages:
  - init

test:
  stage: init
  image: docker:19.03.1
  services: 
    - docker:dind
    - name: mariadb:10.4
      variables:
        MYSQL_ROOT_PASSWORD: root
        MYSQL_DATABASE: root
  variables:
    FF_NETWORK_PER_BUILD: 1
  script:    
    - docker run --rm --network=host mariadb mysql -u root -proot -h mariadb root    

My runner configuration looks like this:

[[runners]]
  name = "runner-1"
  url = "---
  token = "xtADTN6NpT-ALZBgzS8D"
  executor = "docker"
  [runners.custom_build_dir]
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]
    [runners.cache.azure]
  [runners.docker]
    tls_verify = false
    image = "docker:dind"
    privileged = true
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    volumes = ["/cache"]
    volumes = ["/var/run/docker.sock:/var/run/docker.sock", "/cache", "/builds:/builds"]
    shm_size = 0

Thank you for your help