/
BUILD.bazel
48 lines (44 loc) · 1.26 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package(default_visibility = ["//visibility:public"])
load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_push")
# builds the docker image
container_image(
name = "image",
base = "@openjdk11//image",
cmd = ["java", "-jar", "/salsah1/salsah1_deploy.jar"],
# entrypoint = ["java", "-jar", "webapi_deploy.jar"],
env = {
"LANG": "en_US.UTF-8",
"JAVA_OPTS": "-Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8 -Dconfig.file=salsah.conf",
"KNORA_SALSAH1_DEPLOYED": "true",
"KNORA_SALSAH1_WORKDIR": "/salsah1"
},
directory = "salsah1",
files = [
"//salsah1:salsah1_deploy.jar",
],
tars = [
"//salsah1:public_folder_tar"
],
labels = {
"MAINTAINER": "400790+subotic@users.noreply.github.com",
},
ports = [
"3335/tcp",
],
)
# push to dockerhub
container_push(
name = "push",
image = ":image",
format = "Docker",
registry = "index.docker.io",
repository = "daschswiss/knora-salsah1",
tag = "{BUILD_SCM_TAG}"
)
# use in targets needing an up-to-date docker image locally
#genrule(
# name = "build",
# srcs = [":image"],
# cmd = "docker load -i $(location //docker/knora-salsah1:image) >$@",
# outs = ["build-output.txt"]
#)