Opening ports on the host machine is not supported, and is typically not required. All containers in your pipeline are on the same bridge network, which means they can communicate with eachother without opening a port on the host machine.
not sure what I am doing wrong since I found this example somewhere in drone thread.
This yaml file you found was invalid due to unsupported parameters (ports)
I have a requirement to create a scheduler job in drone and it simply email a attachement to user, so for this I create a docker container with Exim smtp service, and below command to bring up the docker container.
so just to simplify this question the tcp ports binding is not possible in drone?