Cannot configure both commands and custom attributes [ports]

Hi;
I am trying to expose the ports while starting docker container and mapping env variable domain but getting this error.

Cannot configure both commands and custom attributes [ports]

not sure what I am doing wrong since I found this example somewhere in drone thread.

pipeline:
build:
image: docker:master
pull: true
ports:
- 2525:25
environment:
- idontmind.org
volumes:
- /tmp/exim:/var/spool/exim4
commands:
- echo “Comming from EXIM DOCKER” | mail -s “EXIM DOCKER” [email protected]

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)

Hi Brad;
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?

docker run -p 2525:2525 -v /tmp/exim:/var/spool/exim4 -e PRIMARY_HOST=idontcare.org -e ALLOWED_HOSTS=“194.168.59.1/16” eximmailer:master