Unable to pull gitlab-runner-helper on AWS Spot instance Docker Machine


we’re autoscaling runners on AWS Spot instances using Docker Machine. I followed the steps here Autoscaling GitLab Runner on AWS EC2 | GitLab. From time to time there’s following error:

    Cleaning up file based variables
    Authenticating with credentials from job payload (GitLab Registry)
    Pulling docker image registry.gitlab.com/gitlab-org/gitlab-runner/gitlab-runner-helper:x86_64-775dd39d ...
    WARNING: Failed to pull image with policy "always": error during connect: Post dial tcp connect: no route to host (docker.go:147:3s)
    ERROR: Failed to cleanup volumes
    ERROR: Job failed (system failure): error during connect: Post dial tcp connect: no route to host

The executor is trying to pull the helper image but probably couldn’t even reach the docker host. Is it trying to reach the docker engine on the docker machine spawned by the runner? How do I set up a proper docker host when the IP address is different with each docker machine? Why is it even pulling the helper image (doesn’t seem to be needed)?

The build is running on image node:14.15.0 (no dind)

concurrent = 3
check_interval = 0

  session_timeout = 1800

  name = "GoAccount-Spot-Runner"
  url = "https://gitlab.com/"
  token = "***"
  executor = "docker+machine"
  limit = 3
    Type = "s3"
    Shared = true
      ServerAddress = "s3.amazonaws.com"
      AccessKey = "***"
      SecretKey = "***"
      BucketName = "goaccount-gitlab-runner-cache"
      BucketLocation = "eu-west-1"
    image = "alpine"
    privileged = true
    disable_cache = true
    IdleCount = 0
    IdleTime = 1800
    MaxGrowthRate = 1
    MaxBuilds = 10
    MachineDriver = "amazonec2"
    MachineName = "gitlab-docker-machine-%s"
    MachineOptions = [