Debugging NodeJs in Node-RED Docker container

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, which is like a startup command (with parameters):

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

On Stackoverflow you can find this example to start NPM:

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

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

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!!

2 Likes

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