bazelbuild / bazelbuild/rules_docker
Shelless invocation for container_run_and_commit
- Dominant language
- Starlark
- Stars
- 1.1k
- Forks
- 689
- PR merge metrics
- No merged PRs in 30d
Description
# 🚀 feature request
### Relevant Rules
Run the command without invoke `/bin/sh`. This would be particularly useful in the [distroless project](https://github.com/GoogleContainerTools/distroless/).
### Description
In a dockerfile, we can run a command as `RUN ["poetry", "install", "--no-cache"]` where it runs the `poetry` binary directly.
### Describe the solution you'd like
Use a 2d list for `container_run_and_commit`. If there is a 2d list, `container_run_and_commit` should execute the binary directly without invoking `/bin/sh`.
```
container_run_and_commit(
name = java_version + "_" + arch + "_" + distro + "_install",
commands = [
["poetry", "install", "--no-cache"]
],
image = java_version + "_amd64_" + distro + "_installer.tar",
)
```
### Describe alternatives you've considered
Cannot execute any binaries in a distroless setting.
Contributor guide
Assessment
This issue has not been assessed yet.