From 6e6d876b839b28797a355650819aab605c388dbc Mon Sep 17 00:00:00 2001 From: Nadezhda Fedorova Date: Mon, 18 Nov 2024 15:45:20 +0300 Subject: [PATCH] add/fix description to some images --- build.py | 4 ++++ org/alt/base/Dockerfile.template | 5 +++++ org/alt/buildpack-deps-curl/Dockerfile.template | 1 + org/alt/buildpack-deps-scm/Dockerfile.template | 1 + org/alt/buildpack-deps/Dockerfile.template | 1 + org/alt/distroless-base/distroless.toml | 1 + org/alt/distroless-devel/distroless.toml | 1 + org/alt/distroless-gotop/distroless.toml | 1 + org/alt/distroless-static/distroless.toml | 1 + org/alt/distroless-toybox/distroless.toml | 2 +- org/alt/distroless-true/distroless.toml | 1 + org/k8s/flannel-cni-plugin/Dockerfile.template | 10 +++++----- org/k8s/pause/Dockerfile.template | 7 +++++++ 13 files changed, 30 insertions(+), 6 deletions(-) diff --git a/build.py b/build.py index c114b15..98b8e7f 100755 --- a/build.py +++ b/build.py @@ -217,6 +217,10 @@ class Distroless: elif value := dd.get("workingdir"): self.config_options.append(f"--workingdir={value}") + if labels := dd.get("label"): + for k, v in labels.items(): + self.config_options.append(f"--label={k}={v}") + def render_arch_branch(self, arch, branch): def if_arches(arches, value, default=""): if arch in arches or not arches: diff --git a/org/alt/base/Dockerfile.template b/org/alt/base/Dockerfile.template index 6aa406f..7fb3734 100644 --- a/org/alt/base/Dockerfile.template +++ b/org/alt/base/Dockerfile.template @@ -2,6 +2,11 @@ FROM {{ registry }}{{ branch }}/{{ alt_image }}:latest MAINTAINER alt-cloud +LABEL org.opencontainers.image.title="base" +LABEL org.opencontainers.image.description="Base image with localization and timezone packages" +LABEL org.opencontainers.image.licenses="GPLv2" +LABEL org.opencontainers.image.vendor="ALT Linux Team" + {{ install_packages("glibc-gconv-modules", "glibc-locales", "tzdata") }} CMD ["bash"] diff --git a/org/alt/buildpack-deps-curl/Dockerfile.template b/org/alt/buildpack-deps-curl/Dockerfile.template index d731394..b55a12a 100644 --- a/org/alt/buildpack-deps-curl/Dockerfile.template +++ b/org/alt/buildpack-deps-curl/Dockerfile.template @@ -3,6 +3,7 @@ FROM {{ registry }}{{ branch }}/{{ alt_image }}:latest MAINTAINER alt-cloud LABEL org.opencontainers.image.title="buildpack-deps-curl" +LABEL org.opencontainers.image.description = "Transfer data environment" LABEL org.opencontainers.image.licenses="GPLv2" LABEL org.opencontainers.image.vendor="ALT Linux Team" diff --git a/org/alt/buildpack-deps-scm/Dockerfile.template b/org/alt/buildpack-deps-scm/Dockerfile.template index 459152d..ed28a28 100644 --- a/org/alt/buildpack-deps-scm/Dockerfile.template +++ b/org/alt/buildpack-deps-scm/Dockerfile.template @@ -4,6 +4,7 @@ MAINTAINER alt-cloud LABEL org.opencontainers.image.title="buildpack-deps-scm" LABEL org.opencontainers.image.licenses="GPLv2" +LABEL org.opencontainers.image.description = "Software configuration management environment" LABEL org.opencontainers.image.vendor="ALT Linux Team" {{ install_packages( diff --git a/org/alt/buildpack-deps/Dockerfile.template b/org/alt/buildpack-deps/Dockerfile.template index 8809c5c..d9b5328 100644 --- a/org/alt/buildpack-deps/Dockerfile.template +++ b/org/alt/buildpack-deps/Dockerfile.template @@ -3,6 +3,7 @@ FROM {{ registry }}{{ branch }}/buildpack-deps-scm:latest MAINTAINER alt-cloud LABEL org.opencontainers.image.title="buildpack-deps" +LABEL org.opencontainers.image.description = "Projects building environment" LABEL org.opencontainers.image.licenses="GPLv2" LABEL org.opencontainers.image.vendor="ALT Linux Team" diff --git a/org/alt/distroless-base/distroless.toml b/org/alt/distroless-base/distroless.toml index 7f76366..5984c5d 100644 --- a/org/alt/distroless-base/distroless.toml +++ b/org/alt/distroless-base/distroless.toml @@ -19,3 +19,4 @@ packages = [ "zlib", ] timezone = "Europe/Moscow" +label = {"org.opencontainers.image.title" = "distroless-base", "org.opencontainers.image.description" = "Base image for running dynamically linked programs", "org.opencontainers.image.licenses" = "GPLv2", "org.opencontainers.image.vendor" = "ALT Linux Team"} diff --git a/org/alt/distroless-devel/distroless.toml b/org/alt/distroless-devel/distroless.toml index cf1d92d..a9b2dd9 100644 --- a/org/alt/distroless-devel/distroless.toml +++ b/org/alt/distroless-devel/distroless.toml @@ -37,3 +37,4 @@ packages = [ "vim-console", ] cmd = ["/bin/bash"] +label = {"org.opencontainers.image.title" = "distroless-devel", "org.opencontainers.image.description" = "Base image for creating and debugging distroless images", "org.opencontainers.image.licenses" = "GPLv2", "org.opencontainers.image.vendor" = "ALT Linux Team"} diff --git a/org/alt/distroless-gotop/distroless.toml b/org/alt/distroless-gotop/distroless.toml index 793db91..a23ee5d 100644 --- a/org/alt/distroless-gotop/distroless.toml +++ b/org/alt/distroless-gotop/distroless.toml @@ -1,3 +1,4 @@ from = "{{ registry }}{{ branch }}/distroless-base:latest" full-files = ["/usr/bin/gotop"] entrypoint = ["/usr/bin/gotop"] +label = {"org.opencontainers.image.title" = "distroless-gotop", "org.opencontainers.image.description" = "Gotop image", "org.opencontainers.image.licenses" = "GPLv2", "org.opencontainers.image.vendor" = "ALT Linux Team"} diff --git a/org/alt/distroless-static/distroless.toml b/org/alt/distroless-static/distroless.toml index 5128a68..3c45325 100644 --- a/org/alt/distroless-static/distroless.toml +++ b/org/alt/distroless-static/distroless.toml @@ -2,3 +2,4 @@ from = "scratch" file-lists = ["static.list"] user = "nonroot" workdir = "/home/nonroot" +label = {"org.opencontainers.image.title" = "distroless-static", "org.opencontainers.image.description" = "Base image for running statically linked programs", "org.opencontainers.image.licenses" = "GPLv2", "org.opencontainers.image.vendor" = "ALT Linux Team"} diff --git a/org/alt/distroless-toybox/distroless.toml b/org/alt/distroless-toybox/distroless.toml index c06c98b..63323ab 100644 --- a/org/alt/distroless-toybox/distroless.toml +++ b/org/alt/distroless-toybox/distroless.toml @@ -2,6 +2,6 @@ from = "{{ registry }}{{ branch }}/distroless-static:latest" builder-install-packages = ["toybox"] files = ["/bin/toybox"] - entrypoint = ["/bin/toybox"] cmd = ["sh"] +label = {"org.opencontainers.image.title" = "distroless-toybox", "org.opencontainers.image.description" = "Base image with toybox environment", "org.opencontainers.image.licenses" = "GPLv2", "org.opencontainers.image.vendor" = "ALT Linux Team"} diff --git a/org/alt/distroless-true/distroless.toml b/org/alt/distroless-true/distroless.toml index a3d727b..03caac1 100644 --- a/org/alt/distroless-true/distroless.toml +++ b/org/alt/distroless-true/distroless.toml @@ -1,3 +1,4 @@ from = "{{ registry }}{{ branch }}/distroless-static:latest" files = ["/bin/true"] cmd = ["/bin/true"] +label = {"org.opencontainers.image.title" = "distroless-true", "org.opencontainers.image.description" = "True-command image for zero status returning", "org.opencontainers.image.licenses" = "GPLv2", "org.opencontainers.image.vendor" = "ALT Linux Team"} diff --git a/org/k8s/flannel-cni-plugin/Dockerfile.template b/org/k8s/flannel-cni-plugin/Dockerfile.template index f1109da..72a0bfa 100644 --- a/org/k8s/flannel-cni-plugin/Dockerfile.template +++ b/org/k8s/flannel-cni-plugin/Dockerfile.template @@ -2,11 +2,11 @@ FROM {{ registry }}{{ branch }}/{{ alt_image }}:latest MAINTAINER alt-cloud -LABEL org.opencontainers.image.title="flannel-cni-plugin" -LABEL org.opencontainers.image.description="CNI network plugin that is powered by flannel" -LABEL org.opencontainers.image.source="https://github.com/flannel-io/cni-plugin" -LABEL org.opencontainers.image.licenses="Apache-2.0" -LABEL org.opencontainers.image.vendor="ALT Linux Team" +LABEL org.opencontainers.image.title="flannel-cni-plugin" \ + org.opencontainers.image.description="CNI network plugin that is powered by flannel" \ + org.opencontainers.image.source="https://github.com/flannel-io/cni-plugin" \ + org.opencontainers.image.licenses="Apache-2.0" \ + org.opencontainers.image.vendor="ALT Linux Team" {{ install_packages("cni-plugin-flannel") }} diff --git a/org/k8s/pause/Dockerfile.template b/org/k8s/pause/Dockerfile.template index a47e2fa..7e0a416 100644 --- a/org/k8s/pause/Dockerfile.template +++ b/org/k8s/pause/Dockerfile.template @@ -1,5 +1,12 @@ FROM {{ registry }}{{ branch }}/{{ alt_image }}:latest as installer +MAINTAINER alt-cloud + +LABEL org.opencontainers.image.title="pause" \ + org.opencontainers.image.description="Simple pause image" \ + org.opencontainers.image.licenses="GPLv2" \ + org.opencontainers.image.vendor="ALT Linux Team" + {{ install_packages("kubernetes-pause") }} FROM scratch