load("@rules_go//go:def.bzl", "go_binary", "go_library") go_library( name = "demo_lib", srcs = ["main.go"], importpath = "code.ndumas.com/ndumas/obsidian-markdown/cmd/demo", visibility = ["//visibility:private"], deps = [ "//:obsidian-markdown", "@org_uber_go_zap//zapcore", ], ) go_binary( name = "demo", embed = [":demo_lib"], visibility = ["//visibility:public"], ) load("@rules_pkg//:pkg.bzl", "pkg_tar") pkg_tar( name = "tar", srcs = [":demo"], ) load("@rules_oci//oci:defs.bzl", "oci_image") oci_image( name = "image", architecture = select({ "@platforms//cpu:arm64": "arm64", "@platforms//cpu:x86_64": "amd64", }), base = ":distroless_base", entrypoint = ["/app"], os = "linux", tars = [":tar"], )