Issue with https connection to influx

I have influxdb running in the influxdb official docker image. I have another container running Ubuntu just as a client. The Ubuntu container can happily ping the influxdb container. However if I try a curl command such as in the Get Started content I just get an empty response. I have installed the python influxdb client onto the Ubuntu box. I can instantiate a “client” but no matter what I try as “host=” in the connection string (ip address, host name per the docker network) any command I send via the client results in a 504 gateway error. I can create databases and query etc. from the client on the influxdb container.
Does anyone have any idea what stupid mistake I am making?

Further information. I am trying to mimic the getting started tutorial. I am running inside just one container now. I have entered

curl -i -XPOST http://localhost:8086/query --data-urlencode “q=CREATE DATABASE mydb”

and received

curl: (52) Empty reply from server

The database was not created but I can create another database from the influx cli.

should the URL be https instead of http?

The response can happen when a http request is sent to https.

Thanks for the suggestion Phil. I have managed to sort it out though. The issue was that both containers had “http_proxy” set and that was refusing connections etc. and stopping communications. UNSET cleared that and it worked as advertised!

Ah good, glad you sorted it. My docker knowledge is pretty much none existant so other than the URL i wouldn’t know where to begin with touble shooting docker containers.