# Debugging NodeJs in Node-RED Docker container

**URL:** <https://discourse.nodered.org/t/debugging-nodejs-in-node-red-docker-container/21370>\
**Category:** Developing Nodes\
**Created:** [6 February 2020 20:43 UTC](https://discourse.nodered.org/t/debugging-nodejs-in-node-red-docker-container/21370 "2020-02-06T20:43:15Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [20 March 2020 21:22 UTC](https://discourse.nodered.org/t/debugging-nodejs-in-node-red-docker-container/21370/21 "2020-03-20T21:22:36Z")

</div>

Hi @Yuji09,

I'm not a Docker specialist either ...  
But the _ **Docker compose yml** _ file describes a container in its running state, while the _ **DockerFile** _ describes how to build the container.  
In that DockerFile you can specify an [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint), which is like a startup command (with parameters):

```auto
ENTRYPOINT ["executable", "param1", "param2"]

```

On [Stackoverflow](https://stackoverflow.com/a/35258547) you can find this example to start NPM:

```auto
ENTRYPOINT ["/usr/local/bin/npm", "run"]

```

So I assume you can use the entrypoint to pass all the stuff that I pass via the _"docker run"_ command.  
But you will need to read about it and experiment.  
Or perhaps wait until @RaymondMouthaan has time to update the official Node-RED image ...

Good luck with it!  
Bart

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [21 March 2020 22:44 UTC](https://discourse.nodered.org/t/debugging-nodejs-in-node-red-docker-container/21370/22 "2020-03-21T22:44:57Z")

</div>

Maybe the docs will help ? - [https://docs.docker.com/compose/compose-file/#entrypoint](https://docs.docker.com/compose/compose-file/#entrypoint)

---

<div class="post-metadata">

**Author:** ![Yuji09](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yuji09/32/29490_2.png) [@Yuji09](https://discourse.nodered.org/u/Yuji09)\
**Post date:** [23 March 2020 15:42 UTC](https://discourse.nodered.org/t/debugging-nodejs-in-node-red-docker-container/21370/23 "2020-03-23T15:42:22Z")

</div>

Hi Bart and dceejay,

Thanks very much for your kind help. Yes, tried the different ways but it seems that making a Dockerfile and referring it in docker-compose seems to be a way....meanwhile I solved the original problem (finding the cause of my custom node's problem). So using this debug way will be my future work. Thanks anyway!!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [22 May 2020 15:51 UTC](https://discourse.nodered.org/t/debugging-nodejs-in-node-red-docker-container/21370/24 "2020-05-22T15:51:12Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.

[Previous page](https://discourse.nodered.org/t/debugging-nodejs-in-node-red-docker-container/21370.md?page=1)
