The description of how commands works says that it converts them into a script run in /bin/sh. What about if the container image does not have /bin/sh in it? FROM scratch images are becoming pretty popular.
Actually, plugins/base appears not have have /bin/sh either:
$docker run --rm plugins/base:multiarch sh
docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"sh\": executable file not found in $PATH": unknown.
The shell is only required when you have a commands section. You will not that plugins never have a commands section, hence why a shell is not required. Instead they use entrypoint and command which you can set directly in the yaml in lieu of commands if you prefer.
Thanks Brad. There is a bug in one of the plugins in how it calls a command (already opened an issue, and a PR), but the plugin doesn’t have sh, so I thought I would keep the same one, just execute around it. Didn’t work as it required /bin/sh. Now I know how to work around it.
In the end, just took a different image and ran some installs. Suboptimal, but works.