How to start node.js app with remote debugging

178 views
Skip to first unread message

Luis Trigueiros

unread,
Feb 21, 2020, 2:27:48 PM2/21/20
to Distroless Users
How can one start a node.js app with distroless for Node.JS with remote debug port enable ?

Thank you, kindly
   Luis Oscar Trigueiros

Brian de Alwis

unread,
Feb 21, 2020, 5:13:20 PM2/21/20
to Distroless Users
Hi Luis.

You should be able to add an `—inspect` argument, either via your entrypoint or from the args.


For example, since the default entrypoint to gcr.io/distroless/nodejs:latest is "/nodejs/bin/node”, the following causes "/nodejs/bin/node --inspect=9229” to be executed:

$ docker run -it --rm  gcr.io/distroless/nodejs --inspect=9229
Debugger listening on ws://127.0.0.1:9229/302a1273-60dd-4cfd-9f49-d0b3a1dbc794
For help, see: https://nodejs.org/en/docs/inspector


Brian.

--
You received this message because you are subscribed to the Google Groups "Distroless Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to distroless-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/distroless-users/668da9f8-a940-4098-a762-4badf6e99382%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages