How to debug NodeJS inside a docker container

It can be tricky to debug a NodeJS application if you haven’t worked with docker for long. Let me save you some time!

The dockerfile I am using: