Bazel: stop using deprecated docker_ rules and turn on stamping

This commit is contained in:
Jeff Grafton
2018-10-12 13:16:38 -07:00
parent c75d772ce9
commit c34cbb2f70
3 changed files with 13 additions and 11 deletions

View File

@@ -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,

View File

@@ -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",