bazel-contrib / bazel-contrib/rules_python

Support native binary-based stage1 bootstrap

Open
#2,500 14 comments 1 reaction 0 assignees View on GitHub
Dominant language
Starlark
Stars
688
Forks
721
Avg merge
14h 49m
Merged PRs (30d)
81

Description

# 🚀 feature request

### Relevant Rules

`py_binary`

### Description

With a similar motivation as #691, we would like to package a `py_binary` (including runfiles) into an `oci_image` and run it within a minimum base image like [distroless_base](https://github.com/GoogleContainerTools/distroless/tree/main/base) in order to minimize the attack surface. This does not come with a shell and other tools which are required by #1929 so this unfortunately doesn't help us.

### Describe the solution you'd like

Use a statically linked executable as loader.

### Describe alternatives you've considered

Add more stuff to the base image. This is suboptimal as this does not only increase the size but also the attack surface.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.