gradle-docker icon indicating copy to clipboard operation
gradle-docker copied to clipboard

Is there a way to specify multiple ports in dockerRun

Open ghost opened this issue 6 years ago • 2 comments

Hi,

Is there a way to specify multiple ports. I tried with

docker run { name containerName image imageName ports ['9042:9042', '9043:9043'] daemonize true } It's not working.

ghost avatar Nov 23 '19 08:11 ghost

Did you got any response on this?

BhavaniShekhar avatar Jan 30 '21 01:01 BhavaniShekhar

Had the same question, looking at the source code one can pass in a collection of strings, hence the following setting should to the job for you

docker run {
  name containerName
  image imageName
  ports '9042:9042', '9043:9043'
  daemonize true
}

jgoerner avatar Feb 18 '21 22:02 jgoerner