Connect to docker daemon running in a different port from 2376

Hi all,

I was just wondering how to connect to a remote daemon running in another port (in my case 8080). I’m using docker-machine to create aws ec2 instances but my company firewall blocks a lot of ports including 2376.

I can quite easily change the daemon on the remote host to listen on a different port (8080 for example), but how to tell docker-machine to use another port to connect to?

I think there could be a flag for --engine-opt to set the port, but I haven’t been able to find which flag to use.

Any thoughts? Or is the port 2376 always required?

Thanks in advance for help