bazel-contrib / bazel-contrib/rules_python

Support native binary-based stage1 bootstrap

Đang mở
#2,500 14 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Starlark
Star
688
Fork
721
Merge trung bình
15 giờ 7 phút
Pull request đã merge (30 ngày)
76

Mô tả

# 🚀 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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách xem xét tích hợp hiện có của py_binary và oci_image, sau đó đọc các cuộc thảo luận liên quan trong #691 và #1929. Issue không nêu tên tệp nguồn hoặc bài kiểm thử nào. Được xem là hoàn tất khi một py_binary, bao gồm cả runfiles của nó, có thể chạy từ một image distroless_base tối giản bằng một executable được liên kết tĩnh làm loader.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
build-system
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
30/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.