mirror of
https://github.com/dockersrc/go
synced 2026-08-09 08:01:21 -04:00
Build and Push / build (push) Failing after 1s
- rootfs/usr/local/bin/entrypoint.sh: the shared case branch for
*/bin/sh|*/bin/bash|bash|sh|shell only conditionally shifted $1 when it
equaled "shell", but the remaining args (e.g. "-c" "echo cmd") then went
straight to __exec_command's `exec "$@"` with no interpreter left to run
them — `docker run image shell -c 'echo cmd'` failed with
"exec: echo cmd: not found" (exit 127). "shell" is a keyword, not a real
executable, so after shifting it away the remaining args need "sh"
prepended. Split the case into two branches: real interpreter names
(*/bin/sh, */bin/bash, bash, sh) pass through unshifted as before; "shell"
gets its own branch that shifts and calls `__exec_command sh "$@"` when
args remain, or bare `__exec_command` (falls back to `exec bash -l`) when
none do. Verified `bash -n` passes; script-lint confirms the edited block
is clean. Found while functional-testing the previous sh/bash -c fix
(commit ab4251e480) against a freshly rebuilt image — sh -c/bash -c now
work, but `docker run casjaysdev/go:latest shell -c 'echo shell-cmd-ok'`
still failed until this fix.