mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-16 22:53:22 +00:00
Bazel: stop using deprecated docker_ rules and turn on stamping
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
load("@io_bazel_rules_docker//docker:docker.bzl", "docker_build", "docker_bundle")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_bundle", "container_image")
|
||||
|
||||
docker_build(
|
||||
container_image(
|
||||
name = "hyperkube-internal",
|
||||
base = "@debian-hyperkube-base-amd64//image",
|
||||
files = [
|
||||
"//cmd/hyperkube",
|
||||
],
|
||||
stamp = True,
|
||||
symlinks = {
|
||||
"/%s" % path: "/hyperkube"
|
||||
for path in [
|
||||
@@ -25,7 +26,7 @@ docker_build(
|
||||
},
|
||||
)
|
||||
|
||||
docker_bundle(
|
||||
container_bundle(
|
||||
name = "hyperkube",
|
||||
images = {"k8s.gcr.io/hyperkube-amd64:{STABLE_DOCKER_TAG}": "hyperkube-internal"},
|
||||
stamp = True,
|
||||
|
@@ -1,16 +1,18 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("@io_bazel_rules_docker//docker:docker.bzl", "docker_build", "docker_push")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_push")
|
||||
|
||||
docker_build(
|
||||
container_image(
|
||||
name = "image",
|
||||
base = "@official_busybox//image",
|
||||
entrypoint = ["/kubemark"],
|
||||
files = ["//cmd/kubemark"],
|
||||
stamp = True,
|
||||
)
|
||||
|
||||
docker_push(
|
||||
container_push(
|
||||
name = "push",
|
||||
format = "Docker",
|
||||
image = ":image",
|
||||
registry = "$(REGISTRY)",
|
||||
repository = "kubemark",
|
||||
|
Reference in New Issue
Block a user