4 ms·
Nice, but PATH isn't always set right. I've run into this particular issue with stripped down containers. I run a script as part of the container's CMD/ENTRYP
by paranoidrobot 4y ago
Nice, but PATH isn't always set right.
I've run into this particular issue with stripped down containers.
I run a script as part of the container's CMD/ENTRYPOINT, and it fails.
Run it through an interactive shell, and hey-presto PATH is setup and script runs fine.
- mbreese 4y agoI’d suspect the problem is a stripped down container where the profile isn’t setup how you’re expecting. The interactive shell (bash, I assume), will setup the profile/env properly. I’m not sure your entrypoint cmd will setup the environment, as IIRC, the inir process would normally take care of this setup. But an entrypoint in a container has different rules. Perhaps if you started your entrypoint with “/bin/bash cmd”??
- nmz 4y agoQuite frankly if your PATH isn't set up correctly you have bigger problems than #!
- kazinator 4y agoIf PATH isn't set up right then #!/usr/bin/env interpreter -S arg, which everyone uses, also won't work. It doesn't amount to a good argument why #!interpreter arg shouldn't be able to do that path search without the env shim or its need for the -S mechanism.