mirror of
https://github.com/dockersrc/go
synced 2026-08-09 02:01:12 -04:00
- rootfs/usr/local/bin/entrypoint.sh: the `*/bin/sh | */bin/bash | bash |
sh | shell)` case branch unconditionally shifted away $1 before calling
__exec_command "$@", which does a bare `exec "$@"`. For `docker run
image sh -c 'cmd'` this turned the exec into `exec -c cmd` (command not
found, exit 127) instead of `exec sh -c 'cmd'` — the interpreter name is
required as the exec'd program itself, not just a case-match keyword.
Only shift when $1 is literally "shell" (a keyword, not an executable
name); "sh"/"bash"/"*/bin/sh"/"*/bin/bash" must be passed through intact.
Verified `bash -n` passes and `docker run casjaysdev/go:latest sh -c
"..."` now runs the command instead of erroring. Found while running the
full functional test pass after the previous START_SERVICES gate fix
(commit 6de223133c).