Hello, I want to create a node.js app using those 2 scripts shown up in SCR1
I’ve put them into my /workspace/app folder
Got my Dockerfile in /workspace
And my Dockerfile looks like this: SCR2
But I constantly get the error “ERR_INVALID_ARG_TYPE”
When I start the app it should check if there is enough memory to run and if not, exit.
While running it should check every 5seconds if there is more memory allocated as allowed. If it does it should say its unhealthy.
The logic is inside those scripts but I have no idea how to put them together without any error.
That is a NodeJS error, not related to Docker. writeFileSync() expects the data as string but you multipled the number in the environment variable converting it to an actual number. You need to convert it back probably by using allocatedMb.toString() but I am not a NodeJS developer so use the way which is recommended in NodeJS.
Note: Please, don’t share screenshots of codes. It makes the code harder to read, impossible to copy and search for an error message and depending on the size of the screen and the size of the picture we even need to zoom on it.