forked from GoogleContainerTools/distroless
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD
51 lines (46 loc) · 1.48 KB
/
BUILD
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
49
50
51
# Public notice: this file is for internal documentation, testing, and
# reference only. Note that repo maintainers can freely change any part of the
# repository code at any time.
package(default_visibility = ["//visibility:public"])
load("@io_bazel_rules_docker//container:container.bzl", "container_image")
load("//base:distro.bzl", "DISTRO_SUFFIXES")
load("//:checksums.bzl", ARCHITECTURES = "BASE_ARCHITECTURES")
# These examples are adapted from:
# https://howtonode.org/hello-node
[
container_image(
name = "hello_" + arch + distro_suffix,
architecture = arch,
base = "//nodejs:nodejs14_" + arch + distro_suffix,
cmd = ["hello.js"],
files = [":hello.js"],
)
for arch in ARCHITECTURES
for distro_suffix in DISTRO_SUFFIXES
]
[
container_image(
name = "hello_http_" + arch + distro_suffix,
architecture = arch,
base = "//nodejs:nodejs14_" + arch + distro_suffix,
cmd = ["hello_http.js"],
files = [":hello_http.js"],
ports = ["8000"],
)
for arch in ARCHITECTURES
for distro_suffix in DISTRO_SUFFIXES
]
load("@io_bazel_rules_docker//contrib:test.bzl", "container_test")
[
container_test(
name = "hello_" + arch + distro_suffix + "_test",
configs = ["testdata/hello.yaml"],
image = ":hello_" + arch + distro_suffix,
tags = [
arch,
"manual",
],
)
for arch in ARCHITECTURES
for distro_suffix in DISTRO_SUFFIXES
]