forked from GoogleContainerTools/distroless
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD
23 lines (20 loc) · 712 Bytes
/
BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 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("@contrib_rules_oci//oci:defs.bzl", "oci_tarball")
load("//private/oci:defs.bzl", "go_image")
package(default_visibility = ["//visibility:public"])
go_image(
name = "go_example",
srcs = ["main.go"],
base = "//base:base_root_amd64_debian11",
)
# Run
# bazel build //examples/go:tarball
# podman load -i bazel-bin/examples/go/tarball/tarball.tar
# podman run localhost/distroless/examples/go:latest
oci_tarball(
name = "tarball",
image = ":go_example",
repotags = ["distroless/examples/go:latest"],
)