0

I see that setting the boolean requirePorts in the marathon app JSON will set the containerPort equal to the hostPort, but I need the opposite scenario - I set hostPort to 0 and now want the servicePort (I'm using marathon-lb) to be equal to the generated hostPort number.

I tried using the automatic environment variable $HOST0 for example but it would accept this in the servicePort field.

Thanks!

jeremy
  • 1
  • 1
    Can you share the app.json? – js84 Nov 05 '17 at 19:55
  • You can use HOST network instead of BRIDGE. Then you will have same random port on container as on host. I'm not sure if I get you question can you add an example? – janisz Nov 09 '17 at 15:46
  • Nevermind, I couldnt set it to HOST network and had to use BRIDGE. I found a workaround to do what I wanted such that in the end this question didnt matter. If this was possible then it would have made my life easier though. – jeremy Nov 15 '17 at 10:47

0 Answers0