-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathBUILD
More file actions
39 lines (36 loc) · 1.02 KB
/
BUILD
File metadata and controls
39 lines (36 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Public notice: this file is for internal documentation, testing, and
# reference only. Note that repo maintainers can freely change any part of the
# repository code at any time.
load("@rules_oci//oci:defs.bzl", "oci_image", "oci_load")
load("//private/util:tar.bzl", "tar")
load("//python3:config.bzl", DISTROS = "PYTHON_DISTROS")
tar(
name = "hello_py",
srcs = ["hello.py"],
)
# This example runs a python program that walks the filesystem under "/etc" and prints every filename.
[
oci_image(
name = "hello_" + distro,
base = "//python3:python3_root_amd64_" + distro,
cmd = [
"hello.py",
"/etc",
],
tars = [
":hello_py",
],
)
for distro in DISTROS
]
# Run
# bazel run //examples/python3:tarball_debian12
# podman run localhost/distroless/examples/py:latest
[
oci_load(
name = "tarball_" + distro,
image = ":hello_" + distro,
repo_tags = ["distroless/examples/py:latest"],
)
for distro in DISTROS
]