I\'d like to retrieve the port mapped to a container using docker inspect, I found something like that:
docker inspect --format=\" {{ .NetworkSettings.Ports }} \
You can use index in your template:
--format '1234/tcp:{{ (index (index .NetworkSettings.Ports "1234/tcp") 0).HostPort }}'