mirror of
https://github.com/google/nomulus.git
synced 2025-07-14 23:15:18 +02: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:
parent
9e3fb8b93c
commit
753a269357
6 changed files with 53 additions and 88 deletions
|
@ -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",
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue