seelio / node-inspector-docker

An example of using node-inspector with docker
22 stars 1 forks source link

node-inspector-docker

An example of using node-inspector with docker. Using this method allows you to use node-inspector on a node.js process running in a docker container, even if node-inspector isn't installed on that image/container.

By running this example, you will have:

The meat of the approach is described in the annotated docker-compose.yml file.

Advantages to this approach:

Yeah that's great whatever, how do I run it?

  1. Clone this repo
  2. Run ./build.sh to build:
    • The node-inspector docker image
    • The coffeescript application
  3. Run docker-compose up
  4. Go to localhost:3000 and localhost:8080 to see the node app and inspector, respectively. You can go to localhost:3001 and localhost:8081 for the coffeescript application

Once you're at the inspector, you can start to set breakpoints, debug, etc.