Merge pull request #1204 from zabbix/centos_64

Use Centos 9 minimal instead of full image
This commit is contained in:
Alexey Pustovalov 2024-02-19 15:25:21 +09:00 committed by GitHub
commit c16160c193
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 290 additions and 162 deletions

View File

@ -5,7 +5,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
FROM quay.io/centos/centos:stream9 FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
@ -32,7 +32,6 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_agentd.conf", "/etc/zabbix/zabbix_agentd.conf"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_agentd.conf", "/etc/zabbix/zabbix_agentd.conf"]
RUN set -eux && \ RUN set -eux && \
REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="bash \ INSTALL_PKGS="bash \
tini \ tini \
tzdata \ tzdata \
@ -40,15 +39,24 @@ RUN set -eux && \
pcre2 \ pcre2 \
libcurl-minimal \ libcurl-minimal \
openssl-libs \ openssl-libs \
shadow-utils \
zlib" && \ zlib" && \
dnf -y install epel-release && \ microdnf -y install \
dnf -y install \ --disablerepo "*" \
--disablerepo "*" \ --enablerepo "extras-common" \
--enablerepo "${REPOLIST}" \ --setopt=install_weak_deps=0 \
--setopt=tsflags=nodocs \ --setopt=keepcache=0 \
--setopt=install_weak_deps=False \ --best \
--best \ --nodocs epel-release && \
${INSTALL_PKGS} && \ microdnf -y install \
--disablerepo "*" \
--enablerepo "baseos" \
--enablerepo "appstream" \
--enablerepo="epel" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \
--nodocs ${INSTALL_PKGS} && \
groupadd \ groupadd \
--system \ --system \
--gid 1995 \ --gid 1995 \
@ -68,7 +76,7 @@ RUN set -eux && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
dnf -y clean all && \ microdnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki

View File

@ -5,7 +5,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
FROM quay.io/centos/centos:stream9 FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
@ -37,7 +37,6 @@ COPY --from=builder ["/tmp/mongodb_plugin/zabbix-agent2-plugin-mongodb", "/usr/s
COPY --from=builder ["/tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql", "/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-postgresql"] COPY --from=builder ["/tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql", "/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-postgresql"]
RUN set -eux && \ RUN set -eux && \
REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="bash \ INSTALL_PKGS="bash \
tini \ tini \
tzdata \ tzdata \
@ -45,16 +44,25 @@ RUN set -eux && \
pcre2 \ pcre2 \
libcurl-minimal \ libcurl-minimal \
smartmontools \ smartmontools \
shadow-utils \
sudo \ sudo \
openssl-libs" && \ openssl-libs" && \
dnf -y install epel-release && \ microdnf -y install \
dnf -y install \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "${REPOLIST}" \ --enablerepo "extras-common" \
--setopt=tsflags=nodocs \ --setopt=install_weak_deps=0 \
--setopt=install_weak_deps=False \ --setopt=keepcache=0 \
--best \ --best \
${INSTALL_PKGS} && \ --nodocs epel-release && \
microdnf -y install \
--disablerepo "*" \
--enablerepo "baseos" \
--enablerepo "appstream" \
--enablerepo="epel" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \
--nodocs ${INSTALL_PKGS} && \
groupadd \ groupadd \
--system \ --system \
--gid 1995 \ --gid 1995 \
@ -77,7 +85,7 @@ RUN set -eux && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ /usr/sbin/zabbix-agent2-plugin/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ /usr/sbin/zabbix-agent2-plugin/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ /usr/sbin/zabbix-agent2-plugin/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ /usr/sbin/zabbix-agent2-plugin/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ /usr/sbin/zabbix-agent2-plugin/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ /usr/sbin/zabbix-agent2-plugin/ && \
dnf -y clean all && \ microdnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki

View File

@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
FROM quay.io/centos/centos:stream9 FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION=6.4 ARG MAJOR_VERSION=6.4
ARG ZBX_VERSION=${MAJOR_VERSION}.11 ARG ZBX_VERSION=${MAJOR_VERSION}.11
@ -19,7 +19,6 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
org.opencontainers.image.version="${ZBX_VERSION}" org.opencontainers.image.version="${ZBX_VERSION}"
RUN set -eux && \ RUN set -eux && \
REPOLIST="baseos,appstream,crb" && \
INSTALL_PKGS="autoconf \ INSTALL_PKGS="autoconf \
automake \ automake \
bash \ bash \
@ -44,13 +43,23 @@ RUN set -eux && \
gettext \ gettext \
go-toolset \ go-toolset \
unixODBC-devel" && \ unixODBC-devel" && \
dnf -y install \ microdnf -y install \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "${REPOLIST}" \ --enablerepo "extras-common" \
--setopt=tsflags=nodocs \ --setopt=install_weak_deps=0 \
--setopt=install_weak_deps=False \ --setopt=keepcache=0 \
--best \ --best \
${INSTALL_PKGS} && \ --nodocs epel-release && \
dnf -y clean all && \ microdnf -y install \
--disablerepo "*" \
--enablerepo "baseos" \
--enablerepo "appstream" \
--enablerepo "crb" \
--enablerepo="epel" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \
--nodocs ${INSTALL_PKGS} && \
microdnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki

View File

@ -5,7 +5,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
FROM quay.io/centos/centos:stream9 FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
@ -30,17 +30,18 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/bin", "/usr/sbi
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/lib", "/usr/sbin/zabbix_java/lib"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/lib", "/usr/sbin/zabbix_java/lib"]
RUN set -eux && \ RUN set -eux && \
REPOLIST="baseos,appstream" && \
INSTALL_PKGS="bash \ INSTALL_PKGS="bash \
shadow-utils \
java-17-openjdk-headless \ java-17-openjdk-headless \
findutils" && \ findutils" && \
dnf -y install \ microdnf -y install \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "${REPOLIST}" \ --enablerepo "baseos" \
--setopt=tsflags=nodocs \ --enablerepo "appstream" \
--setopt=install_weak_deps=False \ --setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \ --best \
${INSTALL_PKGS} && \ --nodocs ${INSTALL_PKGS} && \
groupadd \ groupadd \
--system \ --system \
--gid 1995 \ --gid 1995 \
@ -61,7 +62,7 @@ RUN set -eux && \
chown --quiet -R zabbix:root /etc/zabbix/ /usr/sbin/zabbix_java/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /usr/sbin/zabbix_java/ && \
chgrp -R 0 /etc/zabbix/ /usr/sbin/zabbix_java/ && \ chgrp -R 0 /etc/zabbix/ /usr/sbin/zabbix_java/ && \
chmod -R g=u /etc/zabbix/ /usr/sbin/zabbix_java/ && \ chmod -R g=u /etc/zabbix/ /usr/sbin/zabbix_java/ && \
dnf -y clean all && \ microdnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki

View File

@ -5,7 +5,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
FROM quay.io/centos/centos:stream9 FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
@ -35,7 +35,6 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_proxy.sql.gz", "/usr/share/doc/zabbix-proxy-mysql/create.sql.gz"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_proxy.sql.gz", "/usr/share/doc/zabbix-proxy-mysql/create.sql.gz"]
RUN set -eux && \ RUN set -eux && \
REPOLIST="baseos,appstream,crb,epel" && \
INSTALL_PKGS="libevent \ INSTALL_PKGS="libevent \
tini \ tini \
traceroute \ traceroute \
@ -52,16 +51,26 @@ RUN set -eux && \
openldap \ openldap \
openssl-libs \ openssl-libs \
pcre2 \ pcre2 \
shadow-utils \
zlib \ zlib \
unixODBC" && \ unixODBC" && \
dnf -y install epel-release && \ microdnf -y install \
dnf -y install \ --disablerepo "*" \
--disablerepo "*" \ --enablerepo "extras-common" \
--enablerepo "${REPOLIST}" \ --setopt=install_weak_deps=0 \
--setopt=tsflags=nodocs \ --setopt=keepcache=0 \
--setopt=install_weak_deps=False \ --best \
--best \ --nodocs epel-release && \
${INSTALL_PKGS} && \ microdnf -y install \
--disablerepo "*" \
--enablerepo "baseos" \
--enablerepo "appstream" \
--enablerepo "crb" \
--enablerepo="epel" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \
--nodocs ${INSTALL_PKGS} && \
groupadd \ groupadd \
--system \ --system \
--gid 1995 \ --gid 1995 \
@ -92,7 +101,7 @@ RUN set -eux && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
dnf -y clean all && \ microdnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki

View File

@ -5,7 +5,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-sqlite3:centos-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
FROM quay.io/centos/centos:stream9 FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
@ -34,7 +34,6 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/zabbix/zabbix_proxy.conf"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/zabbix/zabbix_proxy.conf"]
RUN set -eux && \ RUN set -eux && \
REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="libevent \ INSTALL_PKGS="libevent \
tini \ tini \
traceroute \ traceroute \
@ -48,16 +47,25 @@ RUN set -eux && \
openldap \ openldap \
openssl-libs \ openssl-libs \
pcre2 \ pcre2 \
shadow-utils \
zlib \ zlib \
unixODBC" && \ unixODBC" && \
dnf -y install epel-release && \ microdnf -y install \
dnf -y install \ --disablerepo "*" \
--disablerepo "*" \ --enablerepo "extras-common" \
--enablerepo "${REPOLIST}" \ --setopt=install_weak_deps=0 \
--setopt=tsflags=nodocs \ --setopt=keepcache=0 \
--setopt=install_weak_deps=False \ --best \
--best \ --nodocs epel-release && \
${INSTALL_PKGS} && \ microdnf -y install \
--disablerepo "*" \
--enablerepo "baseos" \
--enablerepo "appstream" \
--enablerepo="epel" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \
--nodocs ${INSTALL_PKGS} && \
groupadd \ groupadd \
--system \ --system \
--gid 1995 \ --gid 1995 \
@ -88,7 +96,7 @@ RUN set -eux && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
dnf -y clean all && \ microdnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki

View File

@ -5,7 +5,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
FROM quay.io/centos/centos:stream9 FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
@ -35,7 +35,6 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_server.conf", "/etc
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_server.sql.gz", "/usr/share/doc/zabbix-server-mysql/create.sql.gz"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_server.sql.gz", "/usr/share/doc/zabbix-server-mysql/create.sql.gz"]
RUN set -eux && \ RUN set -eux && \
REPOLIST="baseos,appstream,crb,epel" && \
INSTALL_PKGS="fping \ INSTALL_PKGS="fping \
tini \ tini \
traceroute \ traceroute \
@ -44,9 +43,13 @@ RUN set -eux && \
tzdata \ tzdata \
iputils \ iputils \
traceroute \ traceroute \
libpsl \
libbrotli \
libevent \ libevent \
libxml2 \
libssh \ libssh \
libpsl \
libbrotli \
libxml2 \
mysql \ mysql \
mysql-libs \ mysql-libs \
net-snmp-libs \ net-snmp-libs \
@ -54,25 +57,31 @@ RUN set -eux && \
openldap \ openldap \
openssl-libs \ openssl-libs \
pcre2 \ pcre2 \
shadow-utils \
zlib \ zlib \
gzip \ gzip \
unixODBC" && \ unixODBC" && \
dnf -y install epel-release && \ microdnf -y install \
dnf -y install \ --disablerepo "*" \
--disablerepo "*" \ --enablerepo "extras-common" \
--enablerepo "${REPOLIST}" \ --setopt=install_weak_deps=0 \
--setopt=tsflags=nodocs \ --setopt=keepcache=0 \
--setopt=install_weak_deps=False \ --best \
--best \ --nodocs epel-release && \
${INSTALL_PKGS} && \ microdnf -y install \
dnf -y install \ --disablerepo "*" \
--disablerepo "*" \ --enablerepo "baseos" \
--enablerepo "${REPOLIST}" \ --enablerepo "appstream" \
--setopt=tsflags=nodocs \ --enablerepo "crb" \
--setopt=install_weak_deps=False \ --enablerepo="epel" \
--allowerasing \ --setopt=install_weak_deps=0 \
--best \ --setopt=keepcache=0 \
libcurl && \ --best \
--nodocs ${INSTALL_PKGS} && \
microdnf download libcurl && \
rpm -Uvh --nodeps --replacefiles "*curl*$( uname -i ).rpm" && \
microdnf remove -y libcurl-minimal && \
rm -rf "*curl*$( uname -i ).rpm" && \
groupadd \ groupadd \
--system \ --system \
--gid 1995 \ --gid 1995 \
@ -108,7 +117,7 @@ RUN set -eux && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
dnf -y clean all && \ microdnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki

View File

@ -5,7 +5,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:centos-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
FROM quay.io/centos/centos:stream9 FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
@ -49,6 +49,8 @@ RUN set -eux && \
traceroute \ traceroute \
libevent \ libevent \
libssh \ libssh \
libpsl \
libbrotli \
libxml2 \ libxml2 \
net-snmp-libs \ net-snmp-libs \
OpenIPMI-libs \ OpenIPMI-libs \
@ -57,25 +59,30 @@ RUN set -eux && \
pcre2 \ pcre2 \
postgresql \ postgresql \
postgresql-libs \ postgresql-libs \
shadow-utils \
zlib \ zlib \
gzip \ gzip \
unixODBC" && \ unixODBC" && \
dnf -y install epel-release && \ microdnf -y install \
dnf -y install \ --disablerepo "*" \
--disablerepo "*" \ --enablerepo "extras-common" \
--enablerepo "${REPOLIST}" \ --setopt=install_weak_deps=0 \
--setopt=tsflags=nodocs \ --setopt=keepcache=0 \
--setopt=install_weak_deps=False \ --best \
--best \ --nodocs epel-release && \
${INSTALL_PKGS} && \ microdnf -y install \
dnf -y install \ --disablerepo "*" \
--disablerepo "*" \ --enablerepo "baseos" \
--enablerepo "${REPOLIST}" \ --enablerepo "appstream" \
--setopt=tsflags=nodocs \ --enablerepo="epel" \
--setopt=install_weak_deps=False \ --setopt=install_weak_deps=0 \
--allowerasing \ --setopt=keepcache=0 \
--best \ --best \
libcurl && \ --nodocs ${INSTALL_PKGS} && \
microdnf download libcurl && \
rpm -Uvh --nodeps --replacefiles "*curl*$( uname -i ).rpm" && \
microdnf remove -y libcurl-minimal && \
rm -rf "*curl*$( uname -i ).rpm" && \
groupadd \ groupadd \
--system \ --system \
--gid 1995 \ --gid 1995 \
@ -111,7 +118,7 @@ RUN set -eux && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
dnf -y clean all && \ microdnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki

View File

@ -1,4 +1,4 @@
FROM quay.io/centos/centos:stream9 FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION=6.4 ARG MAJOR_VERSION=6.4
ARG ZBX_VERSION=${MAJOR_VERSION}.11 ARG ZBX_VERSION=${MAJOR_VERSION}.11
@ -22,17 +22,18 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
RUN set -eux && \ RUN set -eux && \
REPOLIST="baseos,appstream" && \
INSTALL_PKGS="bash \ INSTALL_PKGS="bash \
tzdata \ tzdata \
shadow-utils \
net-snmp" && \ net-snmp" && \
dnf -y install \ microdnf -y install \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "${REPOLIST}" \ --enablerepo "baseos" \
--setopt=tsflags=nodocs \ --enablerepo "appstream" \
--setopt=install_weak_deps=False \ --setopt=install_weak_deps=0 \
--best \ --setopt=keepcache=0 \
${INSTALL_PKGS} && \ --best \
--nodocs ${INSTALL_PKGS} && \
groupadd \ groupadd \
--system \ --system \
--gid 1995 \ --gid 1995 \
@ -52,7 +53,7 @@ RUN set -eux && \
chown --quiet -R zabbix:root /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \ chown --quiet -R zabbix:root /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \
chgrp -R 0 /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \ chgrp -R 0 /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \
chmod -R g=u /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \ chmod -R g=u /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \
dnf -y clean all && \ microdnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki

View File

@ -5,7 +5,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
FROM quay.io/centos/centos:stream9 FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
@ -30,7 +30,6 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
COPY ["conf/etc/", "/etc/"] COPY ["conf/etc/", "/etc/"]
RUN set -eux && \ RUN set -eux && \
REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="bash \ INSTALL_PKGS="bash \
curl-minimal \ curl-minimal \
httpd \ httpd \
@ -47,15 +46,31 @@ RUN set -eux && \
php-xml \ php-xml \
findutils \ findutils \
glibc-locale-source \ glibc-locale-source \
shadow-utils \
supervisor" && \ supervisor" && \
dnf -y install epel-release && \ microdnf -y install \
dnf -y install \ --disablerepo "*" \
--disablerepo "*" \ --enablerepo "extras-common" \
--enablerepo "${REPOLIST}" \ --setopt=install_weak_deps=0 \
--setopt=tsflags=nodocs \ --setopt=keepcache=0 \
--setopt=install_weak_deps=False \ --best \
--nodocs epel-release && \
microdnf -y install \
--disablerepo "*" \
--enablerepo "baseos" \
--enablerepo "appstream" \
--enablerepo="epel" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \
--nodocs ${INSTALL_PKGS} && \
microdnf -y reinstall \
--enablerepo "baseos" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \ --best \
${INSTALL_PKGS} && \ --setopt=tsflags=nodocs \
tzdata && \
groupadd \ groupadd \
--system \ --system \
--gid 1995 \ --gid 1995 \
@ -99,10 +114,10 @@ RUN set -eux && \
chown --quiet -R zabbix:root /run/httpd/ /var/lib/php/session/ && \ chown --quiet -R zabbix:root /run/httpd/ /var/lib/php/session/ && \
chgrp -R 0 /run/httpd/ /var/lib/php/session/ && \ chgrp -R 0 /run/httpd/ /var/lib/php/session/ && \
chmod -R g=u /run/httpd/ /var/lib/php/session/ && \ chmod -R g=u /run/httpd/ /var/lib/php/session/ && \
dnf -y remove \ microdnf -y remove \
findutils \ findutils \
glibc-locale-source && \ glibc-locale-source && \
dnf -y clean all && \ microdnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki

View File

@ -5,7 +5,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
FROM quay.io/centos/centos:stream9 FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
@ -30,7 +30,6 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
COPY ["conf/etc/", "/etc/"] COPY ["conf/etc/", "/etc/"]
RUN set -eux && \ RUN set -eux && \
REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="bash \ INSTALL_PKGS="bash \
curl-minimal \ curl-minimal \
httpd \ httpd \
@ -47,15 +46,31 @@ RUN set -eux && \
postgresql \ postgresql \
findutils \ findutils \
glibc-locale-source \ glibc-locale-source \
shadow-utils \
supervisor" && \ supervisor" && \
dnf -y install epel-release && \ microdnf -y install \
dnf -y install \ --disablerepo "*" \
--disablerepo "*" \ --enablerepo "extras-common" \
--enablerepo "${REPOLIST}" \ --setopt=install_weak_deps=0 \
--setopt=tsflags=nodocs \ --setopt=keepcache=0 \
--setopt=install_weak_deps=False \ --best \
--nodocs epel-release && \
microdnf -y install \
--disablerepo "*" \
--enablerepo "baseos" \
--enablerepo "appstream" \
--enablerepo="epel" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \
--nodocs ${INSTALL_PKGS} && \
microdnf -y reinstall \
--enablerepo "baseos" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \ --best \
${INSTALL_PKGS} && \ --setopt=tsflags=nodocs \
tzdata && \
groupadd \ groupadd \
--system \ --system \
--gid 1995 \ --gid 1995 \
@ -99,10 +114,10 @@ RUN set -eux && \
chown --quiet -R zabbix:root /run/httpd/ /var/lib/php/session/ && \ chown --quiet -R zabbix:root /run/httpd/ /var/lib/php/session/ && \
chgrp -R 0 /run/httpd/ /var/lib/php/session/ && \ chgrp -R 0 /run/httpd/ /var/lib/php/session/ && \
chmod -R g=u /run/httpd/ /var/lib/php/session/ && \ chmod -R g=u /run/httpd/ /var/lib/php/session/ && \
dnf -y remove \ microdnf -y remove \
findutils \ findutils \
glibc-locale-source && \ glibc-locale-source && \
dnf -y clean all && \ microdnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki

View File

@ -5,7 +5,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
FROM quay.io/centos/centos:stream9 FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
@ -30,7 +30,6 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
COPY ["conf/etc/", "/etc/"] COPY ["conf/etc/", "/etc/"]
RUN set -eux && \ RUN set -eux && \
REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="bash \ INSTALL_PKGS="bash \
curl-minimal \ curl-minimal \
mysql \ mysql \
@ -45,15 +44,31 @@ RUN set -eux && \
php-xml \ php-xml \
findutils \ findutils \
glibc-locale-source \ glibc-locale-source \
shadow-utils \
supervisor" && \ supervisor" && \
dnf -y install epel-release && \ microdnf -y install \
dnf -y install \ --disablerepo "*" \
--disablerepo "*" \ --enablerepo "extras-common" \
--enablerepo "${REPOLIST}" \ --setopt=install_weak_deps=0 \
--setopt=tsflags=nodocs \ --setopt=keepcache=0 \
--setopt=install_weak_deps=False \ --best \
--nodocs epel-release && \
microdnf -y install \
--disablerepo "*" \
--enablerepo "baseos" \
--enablerepo "appstream" \
--enablerepo="epel" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \
--nodocs ${INSTALL_PKGS} && \
microdnf -y reinstall \
--enablerepo "baseos" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \ --best \
${INSTALL_PKGS} && \ --setopt=tsflags=nodocs \
tzdata && \
groupadd \ groupadd \
--system \ --system \
--gid 1995 \ --gid 1995 \
@ -94,10 +109,10 @@ RUN set -eux && \
chown --quiet -R zabbix:root /var/lib/php/session/ && \ chown --quiet -R zabbix:root /var/lib/php/session/ && \
chgrp -R 0 /var/lib/php/session/ && \ chgrp -R 0 /var/lib/php/session/ && \
chmod -R g=u /var/lib/php/session/ && \ chmod -R g=u /var/lib/php/session/ && \
dnf -y remove \ microdnf -y remove \
findutils \ findutils \
glibc-locale-source && \ glibc-locale-source && \
dnf -y clean all && \ microdnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki

View File

@ -5,7 +5,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:centos-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
FROM quay.io/centos/centos:stream9 FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
@ -30,7 +30,6 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
COPY ["conf/etc/", "/etc/"] COPY ["conf/etc/", "/etc/"]
RUN set -eux && \ RUN set -eux && \
REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="bash \ INSTALL_PKGS="bash \
curl-minimal \ curl-minimal \
findutils \ findutils \
@ -45,15 +44,31 @@ RUN set -eux && \
php-pgsql \ php-pgsql \
php-xml \ php-xml \
postgresql \ postgresql \
shadow-utils \
supervisor" && \ supervisor" && \
dnf -y install epel-release && \ microdnf -y install \
dnf -y install \ --disablerepo "*" \
--disablerepo "*" \ --enablerepo "extras-common" \
--enablerepo "${REPOLIST}" \ --setopt=install_weak_deps=0 \
--setopt=tsflags=nodocs \ --setopt=keepcache=0 \
--setopt=install_weak_deps=False \ --best \
--nodocs epel-release && \
microdnf -y install \
--disablerepo "*" \
--enablerepo "baseos" \
--enablerepo "appstream" \
--enablerepo="epel" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \
--nodocs ${INSTALL_PKGS} && \
microdnf -y reinstall \
--enablerepo "baseos" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \ --best \
${INSTALL_PKGS} && \ --setopt=tsflags=nodocs \
tzdata && \
groupadd \ groupadd \
--system \ --system \
--gid 1995 \ --gid 1995 \
@ -94,10 +109,10 @@ RUN set -eux && \
chown --quiet -R zabbix:root /var/lib/php/session/ && \ chown --quiet -R zabbix:root /var/lib/php/session/ && \
chgrp -R 0 /var/lib/php/session/ && \ chgrp -R 0 /var/lib/php/session/ && \
chmod -R g=u /var/lib/php/session/ && \ chmod -R g=u /var/lib/php/session/ && \
dnf -y remove \ microdnf -y remove \
findutils \ findutils \
glibc-locale-source && \ glibc-locale-source && \
dnf -y clean all && \ microdnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki

View File

@ -5,7 +5,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
FROM quay.io/centos/centos:stream9 FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
@ -31,17 +31,25 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_web_service",
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_web_service.conf", "/etc/zabbix/zabbix_web_service.conf"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_web_service.conf", "/etc/zabbix/zabbix_web_service.conf"]
RUN set -eux && \ RUN set -eux && \
REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="bash \ INSTALL_PKGS="bash \
chromium-headless" && \ chromium-headless \
dnf -y install epel-release && \ shadow-utils" && \
dnf -y install \ microdnf -y install \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "${REPOLIST}" \ --enablerepo "extras-common" \
--setopt=tsflags=nodocs \ --setopt=install_weak_deps=0 \
--setopt=install_weak_deps=False \ --setopt=keepcache=0 \
--best \ --best \
${INSTALL_PKGS} && \ --nodocs epel-release && \
microdnf -y install \
--disablerepo "*" \
--enablerepo "baseos" \
--enablerepo "appstream" \
--enablerepo="epel" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \
--nodocs ${INSTALL_PKGS} && \
groupadd \ groupadd \
--system \ --system \
--gid 1995 \ --gid 1995 \
@ -60,7 +68,7 @@ RUN set -eux && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
dnf -y clean all && \ microdnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki