From e25f3a95f252de89ae4174de8bd0172fb4d98ead Mon Sep 17 00:00:00 2001 From: Nick Dumas Date: Sun, 20 Aug 2023 16:27:05 -0400 Subject: [PATCH] working oci images and pushes --- MODULE.bazel | 10 ++++++++-- cmd/echo/BUILD.bazel | 9 ++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 4d9ba08..682985b 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -15,8 +15,14 @@ use_repo(go_deps, "com_github_therealfakemoot_go_telnet") oci = use_extension("@rules_oci//oci:extensions.bzl", "oci") oci.pull( name = "distroless_base", + digest = "sha256:73deaaf6a207c1a33850257ba74e0f196bc418636cada9943a03d7abea980d6d", image = "gcr.io/distroless/base", - tag = "latest", + platforms = [ + "linux/amd64", + "linux/arm", + "linux/arm64", + "linux/ppc64le", + "linux/s390x", + ], ) - use_repo(oci, "distroless_base") diff --git a/cmd/echo/BUILD.bazel b/cmd/echo/BUILD.bazel index 4f52043..44d8a6c 100644 --- a/cmd/echo/BUILD.bazel +++ b/cmd/echo/BUILD.bazel @@ -20,7 +20,7 @@ pkg_tar( srcs = [":echo"], ) -load("@rules_oci//oci:defs.bzl", "oci_image") +load("@rules_oci//oci:defs.bzl", "oci_image", "oci_push") oci_image( name = "image", @@ -28,3 +28,10 @@ oci_image( entrypoint = ["/echo"], tars = [":tar"], ) + +oci_push( + name = "registry", + image = ":image", + repository = "code.ndumas.com/ndumas/gomud", + remote_tags = ["latest"], +)