forked from GoogleContainerTools/distroless
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WORKSPACE
251 lines (219 loc) · 7.09 KB
/
WORKSPACE
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
workspace(name = "distroless")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
http_archive(
name = "io_bazel_rules_go",
sha256 = "7be7dc01f1e0afdba6c8eb2b43d2fa01c743be1b9273ab1eaf6c233df078d705",
urls = ["https://github.com/bazelbuild/rules_go/releases/download/0.16.5/rules_go-0.16.5.tar.gz"],
)
load("@io_bazel_rules_go//go:def.bzl", "go_register_toolchains", "go_rules_dependencies")
go_rules_dependencies()
go_register_toolchains()
load("//package_manager:package_manager.bzl", "package_manager_repositories")
load("//package_manager:dpkg.bzl", "dpkg_list", "dpkg_src")
package_manager_repositories()
dpkg_src(
name = "debian_stretch",
arch = "amd64",
distro = "stretch",
sha256 = "da378b113f0b1edcf5b1f2c3074fd5476c7fd6e6df3752f824aad22e7547e699",
snapshot = "20190510T144732Z",
url = "https://snapshot.debian.org/archive",
)
dpkg_src(
name = "debian_stretch_backports",
arch = "amd64",
distro = "stretch-backports",
sha256 = "6317cdf1aa80ce6bb0ec99f2043a7399f021babc2a83b9f5ad190b0cd424d699",
snapshot = "20190510T144732Z",
url = "https://snapshot.debian.org/archive",
)
dpkg_src(
name = "debian_stretch_security",
package_prefix = "https://snapshot.debian.org/archive/debian-security/20190510T162559Z/",
packages_gz_url = "https://snapshot.debian.org/archive/debian-security/20190510T162559Z/dists/stretch/updates/main/binary-amd64/Packages.gz",
sha256 = "0645e7edacb45fa8fec510aa8105bfca2bce155b2a08a4fe9628093dc7405326",
)
dpkg_list(
name = "package_bundle",
packages = [
# Version required to skip a security fix to the pre-release library
# TODO: Remove when there is a security fix or dpkg_list finds the recent version
"libc6=2.24-11+deb9u4",
"base-files",
"ca-certificates",
"openssl",
"libssl1.0.2",
"libssl1.1",
"libbz2-1.0",
"libdb5.3",
"libffi6",
"libncursesw5",
"liblzma5",
"libexpat1",
"libreadline7",
"libtinfo5",
"libsqlite3-0",
"mime-support",
"netbase",
"readline-common",
"tzdata",
#c++
"libgcc1",
"libgomp1",
"libstdc++6",
#java
"zlib1g",
"libjpeg62-turbo",
"libpng16-16",
"liblcms2-2",
"libfreetype6",
"fonts-dejavu-core",
"fontconfig-config",
"libfontconfig1",
"openjdk-8-jre-headless",
"openjdk-11-jre-headless",
#python
"libpython2.7-minimal",
"python2.7-minimal",
"libpython2.7-stdlib",
"dash",
# Version required to skip a security fix to the pre-release library
# TODO: Remove when there is a security fix or dpkg_list finds the recent version
"libc-bin=2.24-11+deb9u4",
#python3
"libpython3.5-minimal",
"python3.5-minimal",
"libpython3.5-stdlib",
#dotnet
"libcurl3",
"libgssapi-krb5-2",
"libicu57",
"liblttng-ust0",
"libssl1.0.2",
"libunwind8",
"libuuid1",
"zlib1g",
"curl",
"libcomerr2",
"libidn2-0",
"libk5crypto3",
"libkrb5-3",
"libldap-2.4-2",
"libldap-common",
"libsasl2-2",
"libnghttp2-14",
"libpsl5",
"librtmp1",
"libssh2-1",
"libkeyutils1",
"libkrb5support0",
"libunistring0",
"libgnutls30",
"libgmp10",
"libhogweed4",
"libidn11",
"libnettle6",
"libp11-kit0",
"libffi6",
"libtasn1-6",
"libsasl2-modules-db",
"libdb5.3",
"libgcrypt20",
"libgpg-error0",
"libacl1",
"libattr1",
"libselinux1",
"libpcre3",
"libbz2-1.0",
"liblzma5",
],
# Takes the first package found: security updates should go first
# If there was a security fix to a package before the stable release, this will find
# the older security release. This happened for stretch libc6.
sources = [
"@debian_stretch_security//file:Packages.json",
"@debian_stretch_backports//file:Packages.json",
"@debian_stretch//file:Packages.json",
],
)
# For Jetty
http_archive(
name = "jetty",
build_file = "//:BUILD.jetty",
sha256 = "c66abd7323f6df5b28690e145d2ae829dbd12b8a2923266fa23ab5139a9303c5",
strip_prefix = "jetty-distribution-9.4.14.v20181114/",
type = "tar.gz",
urls = ["https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-distribution/9.4.14.v20181114/jetty-distribution-9.4.14.v20181114.tar.gz"],
)
# Node
http_archive(
name = "nodejs",
build_file = "//experimental/nodejs:BUILD.nodejs",
sha256 = "dc004e5c0f39c6534232a73100c194bc1446f25e3a6a39b29e2000bb3d139d52",
strip_prefix = "node-v8.15.0-linux-x64/",
type = "tar.gz",
urls = ["https://nodejs.org/dist/v8.15.0/node-v8.15.0-linux-x64.tar.gz"],
)
# dotnet
http_archive(
name = "dotnet",
build_file = "//experimental/dotnet:BUILD.dotnet",
sha256 = "69ecad24bce4f2132e0db616b49e2c35487d13e3c379dabc3ec860662467b714",
type = "tar.gz",
urls = ["https://download.microsoft.com/download/5/F/0/5F0362BD-7D0A-4A9D-9BF9-022C6B15B04D/dotnet-runtime-2.0.0-linux-x64.tar.gz"],
)
# For the debug image
http_file(
name = "busybox",
executable = True,
sha256 = "33d0717fb3f79dc05651295553cec1e10ea148b6c61a8c8195ed050429289bd3",
urls = ["https://busybox.net/downloads/binaries/1.30.0-i686/busybox_LINUX64"],
)
# Docker rules.
# TODO: substitute below for "git_repository()" once rules_docker makes a new release > 0.7.0.
#http_archive(
# name = "io_bazel_rules_docker",
# sha256 = "...",
# strip_prefix = "rules_docker-0.x.x",
# urls = ["https://github.com/bazelbuild/rules_docker/archive/v0.x.x.tar.gz"],
#)
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
git_repository(
name = "io_bazel_rules_docker",
commit = "5edd38041535c2c07ca982218d184a5769e329c6",
remote = "https://github.com/bazelbuild/rules_docker.git",
shallow_since = "1553713324 -0400",
)
load(
"@io_bazel_rules_docker//repositories:repositories.bzl",
container_repositories = "repositories",
)
container_repositories()
load("@io_bazel_rules_docker//container:container.bzl", "container_pull")
# Used to generate java ca certs.
container_pull(
name = "debian9",
# From tag: 2019-02-27-130449
digest = "sha256:fd26dfa474b76ef931e439537daba90bbd90d6c5bbdd0252616e6d87251cd9cd",
registry = "gcr.io",
repository = "google-appengine/debian9",
)
# Have the py_image dependencies for testing.
load(
"@io_bazel_rules_docker//python:image.bzl",
_py_image_repos = "repositories",
)
_py_image_repos()
# Have the java_image dependencies for testing.
load(
"@io_bazel_rules_docker//java:image.bzl",
_java_image_repos = "repositories",
)
_java_image_repos()
# Have the go_image dependencies for testing.
load(
"@io_bazel_rules_docker//go:image.bzl",
_go_image_repos = "repositories",
)
_go_image_repos()