|
1 | 1 | load("@aspect_bazel_lib//lib:tar.bzl", "mtree_spec", "tar") |
2 | 2 | load("@aspect_bazel_lib//lib:transitions.bzl", "platform_transition_filegroup") |
3 | | -load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test") |
4 | 3 | load("@rules_oci//oci:defs.bzl", "oci_image", "oci_tarball") |
| 4 | +load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test") |
5 | 5 |
|
6 | 6 | # These rules exist primarily as a way to provide a simple `main` wrapper for |
7 | 7 | # py_test rules, so we don't have to provide a main stub for every test target. |
@@ -74,6 +74,7 @@ def _py_layers(name, binary): |
74 | 74 | Returns: |
75 | 75 | A list of labels for the layers, which are tar files |
76 | 76 | """ |
| 77 | + |
77 | 78 | # Produce layers in this order, as the app changes most often |
78 | 79 | layers = ["interpreter", "packages", "app"] |
79 | 80 |
|
@@ -160,6 +161,7 @@ def ${project}_py_image(name, binary, image_tags, tars = [], base = None, entryp |
160 | 161 | image_tags = ["my-tag:latest"], |
161 | 162 | ) |
162 | 163 | """ |
| 164 | + |
163 | 165 | # NOTE: We would ideally use the @distroless_base image here, which is about 140MB smaller, |
164 | 166 | # but rules_python depends on the host python toolchain to start a py_binary, so we need to |
165 | 167 | # use a base image that ships python. |
|
0 commit comments