From f55f03f91d61b5f0bfe925dc0c254394729c9504 Mon Sep 17 00:00:00 2001 From: Alexander Stepchenko Date: Fri, 12 Apr 2024 17:21:44 +0300 Subject: [PATCH] refactor: fix typo in install_pakage --- build.py | 8 ++++---- org/alt/apache2/Dockerfile.template | 2 +- org/alt/base/Dockerfile.template | 2 +- org/alt/buildpack-deps-curl/Dockerfile.template | 2 +- org/alt/buildpack-deps-scm/Dockerfile.template | 2 +- org/alt/buildpack-deps/Dockerfile.template | 2 +- org/alt/devel/Dockerfile.template | 16 ++++++++-------- org/alt/distroless-builder/Dockerfile.template | 2 +- org/alt/etcd/Dockerfile.template | 2 +- org/alt/gitea/Dockerfile.template | 2 +- org/alt/nginx/Dockerfile.template | 2 +- org/alt/node/Dockerfile.template | 2 +- org/alt/prometheus/Dockerfile.template | 2 +- org/alt/python/Dockerfile.template | 2 +- org/alt/registry/Dockerfile.template | 2 +- org/alt/ruby/Dockerfile.template | 2 +- org/alt/systemd/Dockerfile.template | 2 +- .../cert-manager-cainjector/Dockerfile.template | 2 +- .../cert-manager-controller/Dockerfile.template | 2 +- org/k8s/cert-manager-webhook/Dockerfile.template | 2 +- org/k8s/coredns/Dockerfile.template | 2 +- org/k8s/etcd/Dockerfile.template | 2 +- org/k8s/flannel-cni-plugin/Dockerfile.template | 2 +- org/k8s/flannel/Dockerfile.template | 2 +- org/k8s/kube-apiserver/Dockerfile.template | 2 +- .../kube-controller-manager/Dockerfile.template | 2 +- org/k8s/kube-proxy/Dockerfile.template | 2 +- org/k8s/kube-scheduler/Dockerfile.template | 2 +- org/k8s/pause/Dockerfile.template | 2 +- org/k8s/trivy-node-collector/Dockerfile.template | 2 +- 30 files changed, 40 insertions(+), 40 deletions(-) diff --git a/build.py b/build.py index 5dbc7d7..15bbfcd 100755 --- a/build.py +++ b/build.py @@ -225,7 +225,7 @@ class DockerBuilder: self, template: str, organization: str, - install_pakages=None, + install_packages=None, **kwargs, ) -> str: if self.registry: @@ -237,7 +237,7 @@ class DockerBuilder: rendered = Template(template).render( alt_image=alt_image, branch=self.branch, - install_pakages=install_pakages, + install_packages=install_packages, organization=organization, registry=registry, **kwargs, @@ -247,7 +247,7 @@ class DockerBuilder: @forall_images(consume_result=True) def render_dockerfiles(self, **kwargs): - def install_pakages(*names): + def install_packages(*names): tasks = self.tasks.get(self.branch, kwargs["image"]) linux32 = '$([ "$(rpm --eval %_host_cpu)" = i586 ] && echo linux32)' if tasks: @@ -273,7 +273,7 @@ class DockerBuilder: rendered = self.render_template( dockerfile_template.read_text(), self.overwrite_organization, - install_pakages, + install_packages, ) kwargs["dockerfile"].write_text(rendered + "\n") diff --git a/org/alt/apache2/Dockerfile.template b/org/alt/apache2/Dockerfile.template index 8569660..6bae4e3 100644 --- a/org/alt/apache2/Dockerfile.template +++ b/org/alt/apache2/Dockerfile.template @@ -8,7 +8,7 @@ LABEL org.opencontainers.image.source="http://httpd.apache.org" LABEL org.opencontainers.image.licenses="Apache-2.0" LABEL org.opencontainers.image.vendor="ALT Linux Team" -{{ install_pakages("apache2") }} +{{ install_packages("apache2") }} EXPOSE 80 diff --git a/org/alt/base/Dockerfile.template b/org/alt/base/Dockerfile.template index 56c4ec2..789c8e2 100644 --- a/org/alt/base/Dockerfile.template +++ b/org/alt/base/Dockerfile.template @@ -2,6 +2,6 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }} MAINTAINER alt-cloud -{{ install_pakages("glibc-gconv-modules", "glibc-locales", "tzdata") }} +{{ 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 2bbeceb..1fd96d3 100644 --- a/org/alt/buildpack-deps-curl/Dockerfile.template +++ b/org/alt/buildpack-deps-curl/Dockerfile.template @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.title="buildpack-deps-curl" LABEL org.opencontainers.image.licenses="GPLv2" LABEL org.opencontainers.image.vendor="ALT Linux Team" -{{ install_pakages( +{{ install_packages( "ca-certificates", "curl", "gnupg", diff --git a/org/alt/buildpack-deps-scm/Dockerfile.template b/org/alt/buildpack-deps-scm/Dockerfile.template index 544e8de..83c24c3 100644 --- a/org/alt/buildpack-deps-scm/Dockerfile.template +++ b/org/alt/buildpack-deps-scm/Dockerfile.template @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.title="buildpack-deps-scm" LABEL org.opencontainers.image.licenses="GPLv2" LABEL org.opencontainers.image.vendor="ALT Linux Team" -{{ install_pakages( +{{ install_packages( "git", "mercurial", "openssh-clients", diff --git a/org/alt/buildpack-deps/Dockerfile.template b/org/alt/buildpack-deps/Dockerfile.template index 2c62c87..39805e3 100644 --- a/org/alt/buildpack-deps/Dockerfile.template +++ b/org/alt/buildpack-deps/Dockerfile.template @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.title="buildpack-deps" LABEL org.opencontainers.image.licenses="GPLv2" LABEL org.opencontainers.image.vendor="ALT Linux Team" -{{ install_pakages( +{{ install_packages( "ImageMagick", "autoconf", "automake", diff --git a/org/alt/devel/Dockerfile.template b/org/alt/devel/Dockerfile.template index d046a06..a8e0c66 100644 --- a/org/alt/devel/Dockerfile.template +++ b/org/alt/devel/Dockerfile.template @@ -8,27 +8,27 @@ LABEL org.opencontainers.image.licenses="GPLv2" LABEL org.opencontainers.image.vendor="ALT Linux Team" # install editor -{{ install_pakages("vim-console") }} +{{ install_packages("vim-console") }} # install debugging tools -{{ install_pakages("strace", "gdb") }} +{{ install_packages("strace", "gdb") }} # install document viewers -{{ install_pakages("man") }} +{{ install_packages("man") }} # install version control system -{{ install_pakages("git-core", "perl-Git") }} +{{ install_packages("git-core", "perl-Git") }} # install network utils -{{ install_pakages("iproute2", "iputils", "wget", "curl") }} +{{ install_packages("iproute2", "iputils", "wget", "curl") }} # install file utils -{{ install_pakages("lsof", "ripgrep") }} +{{ install_packages("lsof", "ripgrep") }} # install shell and completions -{{ install_pakages("zsh", "zsh-completions") }} +{{ install_packages("zsh", "zsh-completions") }} # install compilation utils -{{ install_pakages("make", "gcc", "gcc-c++") }} +{{ install_packages("make", "gcc", "gcc-c++") }} CMD ["zsh"] diff --git a/org/alt/distroless-builder/Dockerfile.template b/org/alt/distroless-builder/Dockerfile.template index 7764fe6..03183e6 100644 --- a/org/alt/distroless-builder/Dockerfile.template +++ b/org/alt/distroless-builder/Dockerfile.template @@ -9,7 +9,7 @@ LABEL org.opencontainers.image.vendor="ALT Linux Team" RUN echo %_excludedocs 1 >> /etc/rpm/macros RUN rpm -qalds | awk '/^normal/{print $2}' | xargs rm -rf -{{ install_pakages("python3", "glibc-utils", "apt-repo") }} +{{ install_packages("python3", "glibc-utils", "apt-repo") }} WORKDIR /usr/src/distroless RUN mkdir file-lists RUN useradd -m nonroot diff --git a/org/alt/etcd/Dockerfile.template b/org/alt/etcd/Dockerfile.template index 94197ab..c7c9403 100644 --- a/org/alt/etcd/Dockerfile.template +++ b/org/alt/etcd/Dockerfile.template @@ -8,7 +8,7 @@ LABEL org.opencontainers.image.source="https://github.com/etcd-io/etcd" LABEL org.opencontainers.image.licenses="Apache-2.0" LABEL org.opencontainers.image.vendor="ALT Linux Team" -{{ install_pakages("etcd") }} +{{ install_packages("etcd") }} VOLUME /data diff --git a/org/alt/gitea/Dockerfile.template b/org/alt/gitea/Dockerfile.template index eebc0b7..3b518d8 100644 --- a/org/alt/gitea/Dockerfile.template +++ b/org/alt/gitea/Dockerfile.template @@ -8,7 +8,7 @@ LABEL org.opencontainers.image.source="https://github.com/go-gitea/gitea" LABEL org.opencontainers.image.licenses="MIT" LABEL org.opencontainers.image.vendor="ALT Linux Team" -{{ install_pakages("gitea", "openssh-server", "gosu") }} +{{ install_packages("gitea", "openssh-server", "gosu") }} ENV USER gitea ENV HOME /var/lib/gitea diff --git a/org/alt/nginx/Dockerfile.template b/org/alt/nginx/Dockerfile.template index 33f7480..4aa5924 100644 --- a/org/alt/nginx/Dockerfile.template +++ b/org/alt/nginx/Dockerfile.template @@ -8,7 +8,7 @@ LABEL org.opencontainers.image.source="https://nginx.org/" LABEL org.opencontainers.image.licenses="BSD" LABEL org.opencontainers.image.vendor="ALT Linux Team" -{{ install_pakages("nginx", "apache2-html", "tzdata") }} +{{ install_packages("nginx", "apache2-html", "tzdata") }} RUN cd /etc/nginx/sites-enabled.d && ln -s ../sites-available.d/default.conf . diff --git a/org/alt/node/Dockerfile.template b/org/alt/node/Dockerfile.template index afc0c29..a781d1b 100644 --- a/org/alt/node/Dockerfile.template +++ b/org/alt/node/Dockerfile.template @@ -11,7 +11,7 @@ LABEL org.opencontainers.image.vendor="ALT Linux Team" RUN groupadd --gid 1000 node \ && useradd --uid 1000 --gid node --shell /bin/bash --create-home node -{{ install_pakages( +{{ install_packages( "node", "npm", "yarn" diff --git a/org/alt/prometheus/Dockerfile.template b/org/alt/prometheus/Dockerfile.template index db8115f..0ff8d39 100644 --- a/org/alt/prometheus/Dockerfile.template +++ b/org/alt/prometheus/Dockerfile.template @@ -8,7 +8,7 @@ LABEL org.opencontainers.image.source="https://github.com/prometheus/prometheus" LABEL org.opencontainers.image.licenses="Apache-2.0" LABEL org.opencontainers.image.vendor="ALT Linux Team" -{{ install_pakages("prometheus") }} +{{ install_packages("prometheus") }} WORKDIR /var/lib/prometheus USER prometheus diff --git a/org/alt/python/Dockerfile.template b/org/alt/python/Dockerfile.template index 1e08950..6435a61 100644 --- a/org/alt/python/Dockerfile.template +++ b/org/alt/python/Dockerfile.template @@ -8,7 +8,7 @@ LABEL org.opencontainers.image.source="https://github.com/python/cpython" LABEL org.opencontainers.image.licenses="Python" LABEL org.opencontainers.image.vendor="ALT Linux Team" -{{ install_pakages( +{{ install_packages( "python3-module-pip", "python3-module-setuptools", "python3-dev", diff --git a/org/alt/registry/Dockerfile.template b/org/alt/registry/Dockerfile.template index 88483dc..124a3c6 100644 --- a/org/alt/registry/Dockerfile.template +++ b/org/alt/registry/Dockerfile.template @@ -8,7 +8,7 @@ LABEL org.opencontainers.image.source="https://github.com/docker/distribution" LABEL org.opencontainers.image.licenses="Apache-2.0" LABEL org.opencontainers.image.vendor="ALT Linux Team" -{{ install_pakages("docker-registry") }} +{{ install_packages("docker-registry") }} RUN ln -sf /usr/bin/docker-registry /bin/registry diff --git a/org/alt/ruby/Dockerfile.template b/org/alt/ruby/Dockerfile.template index 9fc7b48..e782f75 100644 --- a/org/alt/ruby/Dockerfile.template +++ b/org/alt/ruby/Dockerfile.template @@ -8,6 +8,6 @@ LABEL org.opencontainers.image.source="https://github.com/ruby/ruby" LABEL org.opencontainers.image.licenses="BSD-2-Clause or Ruby" LABEL org.opencontainers.image.vendor="ALT Linux Team" -{{ install_pakages("irb") }} +{{ install_packages("irb") }} CMD ["irb"] diff --git a/org/alt/systemd/Dockerfile.template b/org/alt/systemd/Dockerfile.template index dff43d6..6f6be30 100644 --- a/org/alt/systemd/Dockerfile.template +++ b/org/alt/systemd/Dockerfile.template @@ -10,7 +10,7 @@ LABEL org.opencontainers.image.vendor="ALT Linux Team" ENV container docker -{{ install_pakages("systemd-sysvinit") }} +{{ install_packages("systemd-sysvinit") }} RUN ( \ cd /lib/systemd/system/sysinit.target.wants/; \ diff --git a/org/k8s/cert-manager-cainjector/Dockerfile.template b/org/k8s/cert-manager-cainjector/Dockerfile.template index 2c974ad..d99fb56 100644 --- a/org/k8s/cert-manager-cainjector/Dockerfile.template +++ b/org/k8s/cert-manager-cainjector/Dockerfile.template @@ -8,7 +8,7 @@ LABEL org.opencontainers.image.source="https://github.com/cert-manager/cert-mana LABEL org.opencontainers.image.licenses="Apache-2.0" LABEL org.opencontainers.image.vendor="ALT Linux Team" -{{ install_pakages("cert-manager") }} +{{ install_packages("cert-manager") }} RUN groupadd -r -g 1000 cert-manger && useradd --no-log-init -r -u 1000 -g cert-manger cert-manger diff --git a/org/k8s/cert-manager-controller/Dockerfile.template b/org/k8s/cert-manager-controller/Dockerfile.template index cda0240..64eb7e0 100644 --- a/org/k8s/cert-manager-controller/Dockerfile.template +++ b/org/k8s/cert-manager-controller/Dockerfile.template @@ -8,7 +8,7 @@ LABEL org.opencontainers.image.source="https://github.com/cert-manager/cert-mana LABEL org.opencontainers.image.licenses="Apache-2.0" LABEL org.opencontainers.image.vendor="ALT Linux Team" -{{ install_pakages("cert-manager") }} +{{ install_packages("cert-manager") }} RUN groupadd -r -g 1000 cert-manger && useradd --no-log-init -r -u 1000 -g cert-manger cert-manger diff --git a/org/k8s/cert-manager-webhook/Dockerfile.template b/org/k8s/cert-manager-webhook/Dockerfile.template index 76deec1..eade8c7 100644 --- a/org/k8s/cert-manager-webhook/Dockerfile.template +++ b/org/k8s/cert-manager-webhook/Dockerfile.template @@ -8,7 +8,7 @@ LABEL org.opencontainers.image.source="https://github.com/cert-manager/cert-mana LABEL org.opencontainers.image.licenses="Apache-2.0" LABEL org.opencontainers.image.vendor="ALT Linux Team" -{{ install_pakages("cert-manager") }} +{{ install_packages("cert-manager") }} RUN groupadd -r -g 1000 cert-manger && useradd --no-log-init -r -u 1000 -g cert-manger cert-manger diff --git a/org/k8s/coredns/Dockerfile.template b/org/k8s/coredns/Dockerfile.template index d841020..6c1d529 100644 --- a/org/k8s/coredns/Dockerfile.template +++ b/org/k8s/coredns/Dockerfile.template @@ -8,6 +8,6 @@ LABEL org.opencontainers.image.source="https://github.com/coredns/coredns" LABEL org.opencontainers.image.licenses="Apache-2.0" LABEL org.opencontainers.image.vendor="ALT Linux Team" -{{ install_pakages("coredns") }} +{{ install_packages("coredns") }} ENTRYPOINT ["/usr/bin/coredns"] diff --git a/org/k8s/etcd/Dockerfile.template b/org/k8s/etcd/Dockerfile.template index 94197ab..c7c9403 100644 --- a/org/k8s/etcd/Dockerfile.template +++ b/org/k8s/etcd/Dockerfile.template @@ -8,7 +8,7 @@ LABEL org.opencontainers.image.source="https://github.com/etcd-io/etcd" LABEL org.opencontainers.image.licenses="Apache-2.0" LABEL org.opencontainers.image.vendor="ALT Linux Team" -{{ install_pakages("etcd") }} +{{ install_packages("etcd") }} VOLUME /data diff --git a/org/k8s/flannel-cni-plugin/Dockerfile.template b/org/k8s/flannel-cni-plugin/Dockerfile.template index 97a81ea..b09e4ca 100644 --- a/org/k8s/flannel-cni-plugin/Dockerfile.template +++ b/org/k8s/flannel-cni-plugin/Dockerfile.template @@ -8,6 +8,6 @@ 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" -{{ install_pakages("cni-plugin-flannel") }} +{{ install_packages("cni-plugin-flannel") }} RUN cp /usr/libexec/cni/flannel /flannel diff --git a/org/k8s/flannel/Dockerfile.template b/org/k8s/flannel/Dockerfile.template index 62fc522..12886c0 100644 --- a/org/k8s/flannel/Dockerfile.template +++ b/org/k8s/flannel/Dockerfile.template @@ -8,7 +8,7 @@ LABEL org.opencontainers.image.source="https://github.com/flannel-io/flannel" LABEL org.opencontainers.image.licenses="Apache-2.0" LABEL org.opencontainers.image.vendor="ALT Linux Team" -{{ install_pakages( +{{ install_packages( "iproute2", "net-tools", "ca-certificates", diff --git a/org/k8s/kube-apiserver/Dockerfile.template b/org/k8s/kube-apiserver/Dockerfile.template index 87c178e..73d2215 100644 --- a/org/k8s/kube-apiserver/Dockerfile.template +++ b/org/k8s/kube-apiserver/Dockerfile.template @@ -2,6 +2,6 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }} MAINTAINER alt-cloud -{{ install_pakages("kubernetes-master") }} +{{ install_packages("kubernetes-master") }} ENTRYPOINT ["/usr/bin/kube-apiserver"] diff --git a/org/k8s/kube-controller-manager/Dockerfile.template b/org/k8s/kube-controller-manager/Dockerfile.template index d575215..0eca625 100644 --- a/org/k8s/kube-controller-manager/Dockerfile.template +++ b/org/k8s/kube-controller-manager/Dockerfile.template @@ -2,6 +2,6 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }} MAINTAINER alt-cloud -{{ install_pakages("kubernetes-master") }} +{{ install_packages("kubernetes-master") }} ENTRYPOINT ["/usr/bin/kube-controller-manager"] diff --git a/org/k8s/kube-proxy/Dockerfile.template b/org/k8s/kube-proxy/Dockerfile.template index 093a96a..39573ff 100644 --- a/org/k8s/kube-proxy/Dockerfile.template +++ b/org/k8s/kube-proxy/Dockerfile.template @@ -2,7 +2,7 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }} MAINTAINER alt-cloud -{{ install_pakages("kubernetes-node") }} +{{ install_packages("kubernetes-node") }} RUN ln -s /usr/bin/kube-proxy /usr/local/bin/kube-proxy diff --git a/org/k8s/kube-scheduler/Dockerfile.template b/org/k8s/kube-scheduler/Dockerfile.template index d0974a8..cf7e3d8 100644 --- a/org/k8s/kube-scheduler/Dockerfile.template +++ b/org/k8s/kube-scheduler/Dockerfile.template @@ -2,6 +2,6 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }} MAINTAINER alt-cloud -{{ install_pakages("kubernetes-master") }} +{{ install_packages("kubernetes-master") }} ENTRYPOINT ["/usr/bin/kube-scheduler"] diff --git a/org/k8s/pause/Dockerfile.template b/org/k8s/pause/Dockerfile.template index c5bdd87..66ab0a9 100644 --- a/org/k8s/pause/Dockerfile.template +++ b/org/k8s/pause/Dockerfile.template @@ -1,6 +1,6 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }} as installer -{{ install_pakages("kubernetes-pause") }} +{{ install_packages("kubernetes-pause") }} FROM scratch diff --git a/org/k8s/trivy-node-collector/Dockerfile.template b/org/k8s/trivy-node-collector/Dockerfile.template index d8e1b4a..7c7fe54 100644 --- a/org/k8s/trivy-node-collector/Dockerfile.template +++ b/org/k8s/trivy-node-collector/Dockerfile.template @@ -8,7 +8,7 @@ LABEL org.opencontainers.image.source="https://github.com/aquasecurity/k8s-node- LABEL org.opencontainers.image.licenses="Apache-2.0" LABEL org.opencontainers.image.vendor="ALT Linux Team" -{{ install_pakages( +{{ install_packages( "k8s-trivy-node-collector" ) }}