Allow to run docker executors without a shell in the image
Description
Currently, Gitlab Runner's docker executor requires a shell (bash/POSIX sh/cmd/powershell) to be available in PATH
of the container, according to https://docs.gitlab.com/runner/executors/docker.html:
Note: The image you choose to run your build in via image directive must have a working shell in its operating system PATH. Supported shells are sh or bash for Linux, and PowerShell for Windows. GitLab Runner cannot execute a command using the underlying OS system calls (like exec).
Moreover, it also requires coreutils
to be present in "Linux" images (but that fact isn't documented).
At the same time, it's possible (and beneficial) to create images without bash or coreutils. Docker can simply exec the binary set as an entrypoint. It especially makes sense for smaller images, where even busybox
takes up more space than the useful payload.
Proposal
Add a way to use images without bash and coreutils by simply mounting relevant directories from host and then exec
'ing the entrypoint.
This probably needs an option in .gitlab-ci.yml
.