-
Notifications
You must be signed in to change notification settings - Fork 5
/
BUILD.bazel
151 lines (142 loc) · 4.51 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
package(default_visibility = ["//visibility:public"])
load("@io_bazel_rules_docker//container:push.bzl", "container_push")
load("@io_bazel_rules_docker//container:image.bzl", "container_image")
load("@package_bundle//file:packages.bzl", "packages")
load("//:deps.bzl", "BAZEL_RELEASES")
container_image(
name = "base",
base = "@java_image_base//image",
debs = [
packages["openjdk-8-jdk-headless"],
packages["libpython2.7-minimal"],
packages["python2.7-minimal"],
packages["libpython2.7-stdlib"],
packages["zlib1g-dev"],
packages["unzip"],
packages["zip"],
packages["libbz2-1.0"],
packages["bash"],
packages["dash"],
packages["libtinfo5"],
packages["base-files"],
packages["debianutils"],
packages["sensible-utils"],
packages["coreutils"],
packages["libacl1"],
packages["libattr1"],
packages["libselinux1"],
packages["libpcre3"],
# awk
packages["gawk"],
packages["libreadline7"],
packages["readline-common"],
packages["dpkg"],
packages["liblzma5"],
packages["tar"],
packages["libsigsegv2"],
# g++
packages["g++-6"],
packages["gcc-6"],
packages["cpp-6"],
packages["gcc-6-base"],
packages["binutils"],
packages["libcc1-0"],
packages["libgcc1"],
packages["libstdc++6"],
packages["libgcc-6-dev"],
packages["libasan3"],
packages["libatomic1"],
packages["libitm1"],
packages["liblsan0"],
packages["libmpx2"],
packages["libquadmath0"],
packages["libtsan0"],
packages["libubsan0"],
packages["libc6-dev"],
packages["libc-dev-bin"],
packages["linux-libc-dev"],
packages["libstdc++-6-dev"],
packages["libisl15"],
packages["libmpc3"],
packages["libmpfr4"],
# git
packages["git"],
packages["libcurl3-gnutls"],
packages["libcomerr2"],
packages["libgssapi-krb5-2"],
packages["libk5crypto3"],
packages["libkeyutils1"],
packages["libkrb5support0"],
packages["libkrb5-3"],
packages["libldap-2.4-2"],
packages["libldap-common"],
packages["libsasl2-2"],
packages["libsasl2-modules-db"],
packages["libgnutls30"],
packages["libidn2-0"],
packages["libhogweed4"],
packages["libnettle6"],
packages["libidn11"],
packages["libp11-kit0"],
packages["libffi6"],
packages["libtasn1-6"],
packages["libssh2-1"],
packages["librtmp1"],
packages["libpsl5"],
packages["libnghttp2-14"],
packages["libgcrypt20"],
packages["libgpg-error0"],
packages["libunistring0"],
packages["libexpat1"],
packages["perl"],
packages["libperl5.24"],
packages["libdb5.3"],
packages["libgdbm3"],
packages["perl-modules-5.24"],
packages["perl-base"],
packages["liberror-perl"],
packages["libgmp10"],
],
env = {
"JAVA_HOME": "/usr/lib/jvm/java-8-openjdk-amd64",
},
symlinks = {
"/usr/bin/java": "/usr/lib/jvm/java-8-openjdk-amd64/bin/java",
"/usr/bin/javac": "/usr/lib/jvm/java-8-openjdk-amd64/bin/java",
"/usr/bin/jar": "/usr/lib/jvm/java-8-openjdk-amd64/bin/jar",
"/usr/bin/jarsigner": "/usr/lib/jvm/java-8-openjdk-amd64/bin/jarsigner",
"/usr/bin/javadoc": "/usr/lib/jvm/java-8-openjdk-amd64/bin/javadoc",
"/usr/bin/javap": "/usr/lib/jvm/java-8-openjdk-amd64/bin/javap",
"/usr/bin/gcc": "/usr/bin/gcc-6",
"/usr/bin/g++": "/usr/bin/g++-6",
},
)
[container_image(
name = "bazel_%s" % version,
base = ":base",
debs = [
"@bazel_release_%s//file" % version.replace('.', '_'),
],
symlinks = {
"/usr/bin/bazel": "/usr/bin/bazel-real",
},
entrypoint = [
"/usr/bin/bazel",
],
) for version in BAZEL_RELEASES.keys()]
[container_push(
name = "gcr." + version,
format = "Docker",
image = ":bazel_%s" % version,
registry = "gcr.io",
repository = "stack-build/distroless/bazel",
tag = version,
) for version in BAZEL_RELEASES.keys()]
[container_push(
name = "dockerhub." + version,
format = "Docker",
image = ":bazel_%s" % version,
registry = "index.docker.io",
repository = "stackb/distroless-bazel",
tag = version,
) for version in BAZEL_RELEASES.keys()]