2021-03-29 12:39:23 +02:00
|
|
|
load("@io_bazel_rules_docker//container:container.bzl", "container_image")
|
2021-01-04 09:35:31 +01:00
|
|
|
load("@io_bazel_rules_docker//docker/package_managers:download_pkgs.bzl", "download_pkgs")
|
|
|
|
load("@io_bazel_rules_docker//docker/package_managers:install_pkgs.bzl", "install_pkgs")
|
|
|
|
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
|
|
|
|
download_pkgs(
|
2021-03-29 12:39:23 +02:00
|
|
|
name = "download-base-production-image",
|
2021-01-04 09:35:31 +01:00
|
|
|
image_tar = "//images:base-image.tar",
|
|
|
|
packages = [
|
|
|
|
"bash",
|
2021-01-08 21:08:47 +01:00
|
|
|
"ca-certificates",
|
2021-01-04 09:35:31 +01:00
|
|
|
"libev4",
|
|
|
|
"libgomp1",
|
2021-01-07 11:32:32 +01:00
|
|
|
"libgoogle-perftools-dev",
|
2021-04-12 19:47:21 +02:00
|
|
|
"libprotobuf23",
|
2022-09-02 17:44:56 +02:00
|
|
|
"libssl3",
|
2021-03-29 12:39:23 +02:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
install_pkgs(
|
|
|
|
name = "install-base-production-image",
|
|
|
|
image_tar = "//images:base-image.tar",
|
|
|
|
installables_tar = ":download-base-production-image.tar",
|
|
|
|
output_image_name = "base-production-image",
|
|
|
|
)
|
|
|
|
|
|
|
|
container_image(
|
|
|
|
name = "base-production-image",
|
|
|
|
base = ":install-base-production-image",
|
2021-04-09 10:17:38 +02:00
|
|
|
env = {
|
|
|
|
"LANG": "C.UTF-8",
|
|
|
|
"LC_CTYPE": "en_US.UTF-8",
|
|
|
|
},
|
2021-03-29 12:39:23 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
download_pkgs(
|
|
|
|
name = "download-base-python-image",
|
|
|
|
image_tar = ":base-production-image.tar",
|
|
|
|
packages = [
|
2022-09-02 17:44:56 +02:00
|
|
|
"python3",
|
|
|
|
"python3-distutils",
|
2021-01-04 09:35:31 +01:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
install_pkgs(
|
|
|
|
name = "install-base-python-image",
|
2021-03-29 12:39:23 +02:00
|
|
|
image_tar = ":base-production-image.tar",
|
2021-01-04 09:35:31 +01:00
|
|
|
installables_tar = ":download-base-python-image.tar",
|
|
|
|
installation_cleanup_commands = "rm -rf /var/lib/apt/lists/*",
|
|
|
|
output_image_name = "installed-base-python-image",
|
|
|
|
)
|
|
|
|
|
|
|
|
container_image(
|
|
|
|
name = "base-python-image",
|
|
|
|
base = ":install-base-python-image",
|
2022-09-02 17:44:56 +02:00
|
|
|
entrypoint = ["/usr/bin/python3"],
|
2021-01-04 09:35:31 +01:00
|
|
|
symlinks = {
|
2022-09-02 17:44:56 +02:00
|
|
|
"/usr/bin/python": "/usr/bin/python3",
|
2021-01-04 09:35:31 +01:00
|
|
|
},
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
2021-01-29 09:18:22 +01:00
|
|
|
download_pkgs(
|
|
|
|
name = "download-base-nodejs-image",
|
2021-03-29 12:39:23 +02:00
|
|
|
image_tar = ":base-production-image.tar",
|
2021-01-29 09:18:22 +01:00
|
|
|
packages = [
|
|
|
|
"nodejs",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
install_pkgs(
|
|
|
|
name = "install-base-nodejs-image",
|
2021-03-29 12:39:23 +02:00
|
|
|
image_tar = ":base-production-image.tar",
|
2021-01-29 09:18:22 +01:00
|
|
|
installables_tar = ":download-base-nodejs-image.tar",
|
|
|
|
installation_cleanup_commands = "rm -rf /var/lib/apt/lists/*",
|
|
|
|
output_image_name = "installed-base-nodejs-image",
|
|
|
|
)
|
|
|
|
|
|
|
|
container_image(
|
|
|
|
name = "base-nodejs-image",
|
|
|
|
base = ":install-base-nodejs-image",
|
|
|
|
entrypoint = ["/usr/bin/nodejs"],
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|