containerized
containerized copied to clipboard
Outputs stderr into console
If running outside a container, this module (the command ran through spawnSync) will print a message into stderr on OSX:
cat: /proc/self/cgroup: No such file or directory
This is the same as running the command directly in Terminal:
$ cat /proc/self/cgroup
cat: /proc/self/cgroup: No such file or directory
Is this behavior expected?
Having this issue too. It shouldn't do this.
@scholtzm @vjpr Understand the problem, have you found ways to overcome this already by now, or what do you prefer would be a better solution? Emit an error event that one could listen to from their code above (and then decide to just ignore it if that is needed, for example)?
It's not really causing us any issues so it doesn't really bother me that much. 😄
I'm thinking the API of this package would get a lot more complicated (from a single boolean function to event emitting object), so I'm not sure if I would personally go that way. 🤔
@martintajur That's a good point, someone might want to run node app just inside the container, event emitting might be a good way to ensure that.
Can you not just pass in stdio: 'ignore' as an option to child_process?
cgroups = child_process.execSync(cmd(), {
stdio: 'ignore'
});
This is happening also on Windows: 'cat' is not recognized as an internal or external command, operable program or batch file.
Does the same thing on MacOS.
cat: /proc/self/cgroup: No such file or directory
Stops nodemon from running.
DEPRECATED (You can use following package instead: https://github.com/sindresorhus/is-docker)