Dockerized Meteor development debug port configuration

Hello everyone, I am using a somewhat simple meteor image to run my applications inside docker while developing. Everything works very nicely (although it took me time to set it just right). The only problem I am facing now is with the--debug-port option.

I run meteor with meteor run --debug-port=56947 I also tried without equals, which produces the same behaviour: The effective port, as stated by meteor “Debugger listening on [::]:57047” is different, as you can see in this example. I’ve tried countless times to bring any kind of consistency to the port numbers without success. I wouldn’t be too angry with it and just set my debugger’s port on the one displayed in the logs, but unfortunately enough, I have to map the container’s port to my host system and doing that restarts the container, which then receives another port.

If someone has had the same problems, have you found a solution?

I’d like to give a little bump to this post as I still haven’t found any solution. I really doubt that dockerizing the application has anything to do about the problem at hand…

How do you debug your meteor apps?