Force all Drone driven containers to use only ipv4

I have Drone running a container that has docker-compose, and this container is executing a build of quite a few containers. The commands run are:

    ---
    kind: pipeline
    type: docker
    name: build-docker-containers

    steps:

    - name: docker-images
      image: some-system:8990/base/docker-tools
      pull: if-not-exists
      commands:
      - docker-compose build
      - docker-compose push
      volumes:
      - name: docker-sock
        path: /var/run/docker.sock

    image_pull_secrets:
      - dockerconfig

    volumes:
    - name: docker-sock
      host:
        path: /var/run/docker.sock

Now, when I runt it, the containers that are being built are executing RUN commands, and some of these are executing curl or yum install. The problem is that these commands are somehow resolving external (internet) resources as ipv6, and our network does not even have a route to ipv6.

Here is what I have tried:

  1. Binding the runner to a IPv4 address instead of the default 0.0.0.0
  2. Disabling ipv6 on the host sysctl -p returns net.ipv6.conf.all.disable_ipv6 = 1 and
    net.ipv6.conf.default.disable_ipv6 = 1

But still, the following persists -

curl#7 - "Failed to connect to 2604:1380:2001:d00::3: Network is unreachable"

So, whats going on here? How come DNS is resolving an IPv6 address to the container, when even the host that its running on does not support it?

A better more solution focussed question is - how do I fix this? What am I failing to do here?

Drone uses standard docker networking (networks are created using the docker network create command) so you may want to direct this question to the Docker community support group to see if they have any tips for configuring the Docker daemon accordingly.