mirror of
https://github.com/google/nomulus
synced 2026-09-20 06:54:43 +00:00
Use bazel rules to build docker image and push to GCR
Using bazel to build and push image result in reproducible builds. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=187252645
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
# This package contains the code for the binary that proxies TCP traffic from
|
||||
# the GCE/GKE to AppEngine.
|
||||
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_push")
|
||||
|
||||
package(
|
||||
default_visibility = ["//java/google/registry:registry_project"],
|
||||
)
|
||||
@@ -48,3 +50,28 @@ java_binary(
|
||||
"@io_netty_tcnative",
|
||||
],
|
||||
)
|
||||
|
||||
container_image(
|
||||
name = "proxy_image",
|
||||
base = "@java_base//image",
|
||||
entrypoint = [
|
||||
"java",
|
||||
"-jar",
|
||||
"proxy_server_deploy.jar",
|
||||
],
|
||||
files = [":proxy_server_deploy.jar"],
|
||||
ports = [
|
||||
"30000",
|
||||
"30001",
|
||||
"30002",
|
||||
],
|
||||
)
|
||||
|
||||
container_push(
|
||||
name = "proxy_push",
|
||||
format = "Docker",
|
||||
image = ":proxy_image",
|
||||
registry = "gcr.io",
|
||||
repository = "GCP_PROJECT/IMAGE_NAME",
|
||||
tag = "bazel",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user