Closed IsaaX closed 5 years ago
@IsaaX Yes. Well, the way I would like this to work is to have minimum configuration. We are detecting docker already via is-docker
package, for example here:
https://github.com/sysgears/spinjs/blob/ba8a348d7967c7c40c58893de9fb8a8ddbad7194/src/executor.ts#L271
So, maybe when we submit arguments for --inspect
and we run inside docker (is-docker
says us so), we can use by default 0.0.0.0:port
, instead of just port
What do you think?
That's an excellent solution! Sounds easy to implement as well. I can give it a go and submit a PR. If it seems too challenging I"ll let you know.
@IsaaX Thank you, sounds good!
Closed via #18
Published in spinjs@0.4.168
Lovely package! So I've been using spinjs and have recently dockerized the application in order to obtain https and in that it's almost functional. So one of the things that I haven't been able to configure correctly is the ability to debug when running on a docker container. That mainly being the builder ends up binding inspection host to
localhost
meaning it's not accessible from the outside world and only in the container. Here is some context.If there was a way to bind to
0.0.0.0
in the container then it would bind it to the 9229 port on my machine and I would be able to inspect on it.https://nodejs.org/en/docs/guides/debugging-getting-started/
I hope this makes sense and would love your input on this. If we can decide on an approach, I wouldn't mind tackling it and submitting a PR. Any thoughts?
Once again, appreciate this repo! It's been great.