Rancher behind proxy cannot create cluster

I am trying to set up a cluster using the rancher/rancher:2.2.4 container on a host behind a proxy. I have run rancher using the following command:

docker run -d --name rancher --restart=unless-stopped -p 443:443 -e HTTP_PROXY=‘redacted’ -e HTTPS_PROXY=‘redacted’ -e NO_PROXY=‘localhost,127.0.0.1,0.0.0.0,redacted.0/24,redacted.com’ rancher/rancher:v2.2.4

When I try to create a cluster, I get this error for all nodes:

Error creating machine: Error in driver during machine creation: Get https://releases.rancher.com/os/latest/rancheros-vmware.iso: dial tcp 104.24.16.51:443: connect: connection timed out; Timeout waiting for ssh key

When I check the container, it seems to be trying to connect externally without using the proxy:

netstat -tnp | grep SYN

tcp 0 1 172.17.0.3:55612 104.24.16.51:443 SYN_SENT 255/docker-machine
tcp 0 1 172.17.0.3:43446 104.24.17.51:443 SYN_SENT 233/docker-machine
tcp 0 1 172.17.0.3:43444 104.24.17.51:443 SYN_SENT 217/docker-machine
tcp 0 1 172.17.0.3:55610 104.24.16.51:443 SYN_SENT 236/docker-machine

Have I missed a configuration step, or do I need to investigate a bug?

Many thanks,
Donald Hunter

I believe you are hitting this issue

Will be fixed in v2.2.5

Thanks for your help. I can confirm that 2.2.5-rc6 resolves this issue.