Use Centos 9 minimal instead of full image

This commit is contained in:
Alexey Pustovalov 2024-02-18 20:52:36 +09:00
parent a102daae05
commit 6d8320203d
14 changed files with 290 additions and 163 deletions

View File

@ -5,7 +5,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder
FROM quay.io/centos/centos:stream9
FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_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"]
RUN set -eux && \
REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="bash \
tzdata \
iputils \
@ -40,15 +39,24 @@ RUN set -eux && \
libcurl-minimal \
libmodbus \
openssl-libs \
shadow-utils \
zlib" && \
dnf -y install epel-release && \
dnf -y install \
--disablerepo "*" \
--enablerepo "${REPOLIST}" \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
--best \
${INSTALL_PKGS} && \
microdnf -y install \
--disablerepo "*" \
--enablerepo "extras-common" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--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} && \
groupadd \
--system \
--gid 1995 \
@ -68,7 +76,7 @@ RUN set -eux && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /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/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 quay.io/centos/centos:stream9
FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_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"]
RUN set -eux && \
REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="bash \
tzdata \
iputils \
@ -45,16 +44,25 @@ RUN set -eux && \
libcurl-minimal \
libmodbus \
smartmontools \
shadow-utils \
sudo \
openssl-libs" && \
dnf -y install epel-release && \
dnf -y install \
microdnf -y install \
--disablerepo "*" \
--enablerepo "${REPOLIST}" \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
--enablerepo "extras-common" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--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 \
--system \
--gid 1995 \
@ -77,7 +85,7 @@ RUN set -eux && \
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/ && \
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/dnf /etc/udev/hwdb.bin /root/.pki

View File

@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM quay.io/centos/centos:stream9
FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION=7.0
ARG ZBX_VERSION=${MAJOR_VERSION}
@ -19,7 +19,6 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
org.opencontainers.image.version="${ZBX_VERSION}"
RUN set -eux && \
REPOLIST="baseos,appstream,crb,epel" && \
INSTALL_PKGS="autoconf \
automake \
bash \
@ -45,14 +44,23 @@ RUN set -eux && \
gettext \
go-toolset \
unixODBC-devel" && \
dnf -y install epel-release && \
dnf -y install \
microdnf -y install \
--disablerepo "*" \
--enablerepo "${REPOLIST}" \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
--enablerepo "extras-common" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \
${INSTALL_PKGS} && \
dnf -y clean all && \
--nodocs epel-release && \
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/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 quay.io/centos/centos:stream9
FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_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"]
RUN set -eux && \
REPOLIST="baseos,appstream" && \
INSTALL_PKGS="bash \
shadow-utils \
java-17-openjdk-headless \
findutils" && \
dnf -y install \
microdnf -y install \
--disablerepo "*" \
--enablerepo "${REPOLIST}" \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
--enablerepo "baseos" \
--enablerepo "appstream" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \
${INSTALL_PKGS} && \
--nodocs ${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
@ -61,7 +62,7 @@ RUN set -eux && \
chown --quiet -R zabbix:root /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/ && \
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/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 quay.io/centos/centos:stream9
FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_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"]
RUN set -eux && \
REPOLIST="baseos,appstream,crb,epel" && \
INSTALL_PKGS="libevent \
traceroute \
nmap \
@ -51,16 +50,26 @@ RUN set -eux && \
openldap \
openssl-libs \
pcre2 \
shadow-utils \
zlib \
unixODBC" && \
dnf -y install epel-release && \
dnf -y install \
--disablerepo "*" \
--enablerepo "${REPOLIST}" \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
--best \
${INSTALL_PKGS} && \
microdnf -y install \
--disablerepo "*" \
--enablerepo "extras-common" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \
--nodocs epel-release && \
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 \
--system \
--gid 1995 \
@ -91,7 +100,7 @@ RUN set -eux && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /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/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 quay.io/centos/centos:stream9
FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_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"]
RUN set -eux && \
REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="libevent \
traceroute \
nmap \
@ -47,16 +46,25 @@ RUN set -eux && \
openldap \
openssl-libs \
pcre2 \
shadow-utils \
zlib \
unixODBC" && \
dnf -y install epel-release && \
dnf -y install \
--disablerepo "*" \
--enablerepo "${REPOLIST}" \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
--best \
${INSTALL_PKGS} && \
microdnf -y install \
--disablerepo "*" \
--enablerepo "extras-common" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--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} && \
groupadd \
--system \
--gid 1995 \
@ -87,7 +95,7 @@ RUN set -eux && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /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/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 quay.io/centos/centos:stream9
FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_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"]
RUN set -eux && \
REPOLIST="baseos,appstream,crb,epel" && \
INSTALL_PKGS="fping \
traceroute \
nmap \
@ -43,9 +42,13 @@ RUN set -eux && \
tzdata \
iputils \
traceroute \
libpsl \
libbrotli \
libevent \
libxml2 \
libssh \
libpsl \
libbrotli \
libxml2 \
mysql \
mysql-libs \
net-snmp-libs \
@ -53,25 +56,31 @@ RUN set -eux && \
openldap \
openssl-libs \
pcre2 \
shadow-utils \
zlib \
gzip \
unixODBC" && \
dnf -y install epel-release && \
dnf -y install \
--disablerepo "*" \
--enablerepo "${REPOLIST}" \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
--best \
${INSTALL_PKGS} && \
dnf -y install \
--disablerepo "*" \
--enablerepo "${REPOLIST}" \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
--allowerasing \
--best \
libcurl && \
microdnf -y install \
--disablerepo "*" \
--enablerepo "extras-common" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \
--nodocs epel-release && \
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 download libcurl && \
rpm -Uvh --nodeps --replacefiles "*curl*$( uname -i ).rpm" && \
microdnf remove -y libcurl-minimal && \
rm -rf "*curl*$( uname -i ).rpm" && \
groupadd \
--system \
--gid 1995 \
@ -107,7 +116,7 @@ RUN set -eux && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /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/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 quay.io/centos/centos:stream9
FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION
ARG ZBX_VERSION
@ -48,6 +48,8 @@ RUN set -eux && \
traceroute \
libevent \
libssh \
libpsl \
libbrotli \
libxml2 \
net-snmp-libs \
OpenIPMI-libs \
@ -56,25 +58,30 @@ RUN set -eux && \
pcre2 \
postgresql \
postgresql-libs \
shadow-utils \
zlib \
gzip \
unixODBC" && \
dnf -y install epel-release && \
dnf -y install \
--disablerepo "*" \
--enablerepo "${REPOLIST}" \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
--best \
${INSTALL_PKGS} && \
dnf -y install \
--disablerepo "*" \
--enablerepo "${REPOLIST}" \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
--allowerasing \
--best \
libcurl && \
microdnf -y install \
--disablerepo "*" \
--enablerepo "extras-common" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--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 download libcurl && \
rpm -Uvh --nodeps --replacefiles "*curl*$( uname -i ).rpm" && \
microdnf remove -y libcurl-minimal && \
rm -rf "*curl*$( uname -i ).rpm" && \
groupadd \
--system \
--gid 1995 \
@ -110,7 +117,7 @@ RUN set -eux && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /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/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=7.0
ARG ZBX_VERSION=${MAJOR_VERSION}
@ -22,17 +22,18 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
STOPSIGNAL SIGTERM
RUN set -eux && \
REPOLIST="baseos,appstream" && \
INSTALL_PKGS="bash \
tzdata \
shadow-utils \
net-snmp" && \
dnf -y install \
--disablerepo "*" \
--enablerepo "${REPOLIST}" \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
--best \
${INSTALL_PKGS} && \
microdnf -y install \
--disablerepo "*" \
--enablerepo "baseos" \
--enablerepo "appstream" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \
--nodocs ${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
@ -52,7 +53,7 @@ RUN set -eux && \
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/ && \
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/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 quay.io/centos/centos:stream9
FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION
ARG ZBX_VERSION
@ -30,7 +30,6 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
COPY ["conf/etc/", "/etc/"]
RUN set -eux && \
REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="bash \
curl-minimal \
httpd \
@ -47,15 +46,31 @@ RUN set -eux && \
php-xml \
findutils \
glibc-locale-source \
shadow-utils \
supervisor" && \
dnf -y install epel-release && \
dnf -y install \
--disablerepo "*" \
--enablerepo "${REPOLIST}" \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
microdnf -y install \
--disablerepo "*" \
--enablerepo "extras-common" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--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 \
${INSTALL_PKGS} && \
--setopt=tsflags=nodocs \
tzdata && \
groupadd \
--system \
--gid 1995 \
@ -99,10 +114,10 @@ RUN set -eux && \
chown --quiet -R zabbix:root /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/ && \
dnf -y remove \
microdnf -y remove \
findutils \
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/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 quay.io/centos/centos:stream9
FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION
ARG ZBX_VERSION
@ -30,7 +30,6 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
COPY ["conf/etc/", "/etc/"]
RUN set -eux && \
REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="bash \
curl-minimal \
httpd \
@ -47,15 +46,31 @@ RUN set -eux && \
postgresql \
findutils \
glibc-locale-source \
shadow-utils \
supervisor" && \
dnf -y install epel-release && \
dnf -y install \
--disablerepo "*" \
--enablerepo "${REPOLIST}" \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
microdnf -y install \
--disablerepo "*" \
--enablerepo "extras-common" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--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 \
${INSTALL_PKGS} && \
--setopt=tsflags=nodocs \
tzdata && \
groupadd \
--system \
--gid 1995 \
@ -99,10 +114,10 @@ RUN set -eux && \
chown --quiet -R zabbix:root /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/ && \
dnf -y remove \
microdnf -y remove \
findutils \
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/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 quay.io/centos/centos:stream9
FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION
ARG ZBX_VERSION
@ -30,7 +30,6 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
COPY ["conf/etc/", "/etc/"]
RUN set -eux && \
REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="bash \
curl-minimal \
mysql \
@ -45,15 +44,31 @@ RUN set -eux && \
php-xml \
findutils \
glibc-locale-source \
shadow-utils \
supervisor" && \
dnf -y install epel-release && \
dnf -y install \
--disablerepo "*" \
--enablerepo "${REPOLIST}" \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
microdnf -y install \
--disablerepo "*" \
--enablerepo "extras-common" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--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 \
${INSTALL_PKGS} && \
--setopt=tsflags=nodocs \
tzdata && \
groupadd \
--system \
--gid 1995 \
@ -94,10 +109,10 @@ RUN set -eux && \
chown --quiet -R zabbix:root /var/lib/php/session/ && \
chgrp -R 0 /var/lib/php/session/ && \
chmod -R g=u /var/lib/php/session/ && \
dnf -y remove \
microdnf -y remove \
findutils \
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/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 quay.io/centos/centos:stream9
FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION
ARG ZBX_VERSION
@ -30,7 +30,6 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
COPY ["conf/etc/", "/etc/"]
RUN set -eux && \
REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="bash \
curl-minimal \
findutils \
@ -45,15 +44,31 @@ RUN set -eux && \
php-pgsql \
php-xml \
postgresql \
shadow-utils \
supervisor" && \
dnf -y install epel-release && \
dnf -y install \
--disablerepo "*" \
--enablerepo "${REPOLIST}" \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
microdnf -y install \
--disablerepo "*" \
--enablerepo "extras-common" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--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 \
${INSTALL_PKGS} && \
--setopt=tsflags=nodocs \
tzdata && \
groupadd \
--system \
--gid 1995 \
@ -94,10 +109,10 @@ RUN set -eux && \
chown --quiet -R zabbix:root /var/lib/php/session/ && \
chgrp -R 0 /var/lib/php/session/ && \
chmod -R g=u /var/lib/php/session/ && \
dnf -y remove \
microdnf -y remove \
findutils \
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/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 quay.io/centos/centos:stream9
FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_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"]
RUN set -eux && \
REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="bash \
chromium-headless" && \
dnf -y install epel-release && \
dnf -y install \
--disablerepo "*" \
--enablerepo "${REPOLIST}" \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
--best \
${INSTALL_PKGS} && \
chromium-headless \
shadow-utils" && \
microdnf -y install \
--disablerepo "*" \
--enablerepo "extras-common" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--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} && \
groupadd \
--system \
--gid 1995 \
@ -60,7 +68,7 @@ RUN set -eux && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /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/dnf /etc/udev/hwdb.bin /root/.pki