services: dind: image: docker:dind privileged: true networks: default: aliases: - docker environment: DOCKER_DRIVER: overlay2 DOCKER_HOST: tcp://docker:2376 DOCKER_TLS_VERIFY: "1" DOCKER_TLS_CERTDIR: /certs DOCKER_CERT_PATH: /certs/client volumes: - dind_volume:/var/lib/docker - dind_certs:/certs/client restart: unless-stopped healthcheck: test: ["CMD", "docker", "info"] interval: 30s timeout: 10s retries: 5 start_period: 10s runner: image: gitlab/gitlab-runner:latest container_name: gitlab_runner env_file: .env environment: DOCKER_HOST: tcp://docker:2376 DOCKER_TLS_VERIFY: "1" DOCKER_CERT_PATH: /certs/client volumes: - runner_config_volume:/etc/gitlab-runner - dind_certs:/certs/client - ./runner-entrypoint.sh:/entrypoint.sh:Z restart: unless-stopped entrypoint: ["bash", "/entrypoint.sh"] depends_on: dind: condition: service_healthy volumes: runner_config_volume: dind_volume: dind_certs: