pre-bazel execution draft of OCI stuff

main
Nick Dumas 1 year ago
parent 63fa87f33b
commit 83f869f938

@ -5,8 +5,18 @@ module(
bazel_dep(name = "gazelle", version = "0.32.0")
bazel_dep(name = "rules_go", version = "0.41.0")
bazel_dep(name = "rules_oci", version = "1.3.1")
bazel_dep(name = "rules_pkg", version = "0.9.1")
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(go_deps, "com_github_therealfakemoot_go_telnet")
oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")
oci.pull(
name = "distroless_base",
image = "gcr.io/distroless/base",
tag = "latest",
)
use_repo(oci, "distroless_base")

@ -12,3 +12,19 @@ go_binary(
embed = [":echo_lib"],
visibility = ["//visibility:public"],
)
load("@rules_pkg//:pkg.bzl", "pkg_tar")
pkg_tar(
name = "tar",
srcs = [":echo"],
)
load("@rules_oci//oci:defs.bzl", "oci_image")
oci_image(
name = "image",
base = "@distroless_base",
entrypoint = ["/echo"],
tars = [":tar"],
)

Loading…
Cancel
Save