Updated CentOS 8 to CentOS 9

This commit is contained in:
Alexey Pustovalov
2024-12-03 18:04:04 +09:00
parent d598feb719
commit 604c81fac2
16 changed files with 335 additions and 319 deletions

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:stream8
FROM quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION
ARG ZBX_VERSION
@ -34,7 +34,6 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/", "/usr/bin
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
set -eux && \
REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="bash \
tini \
libevent \
@ -49,29 +48,32 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
openldap \
openssl-libs \
pcre2 \
shadow-utils \
zlib \
unixODBC" && \
dnf -y install \
microdnf -y install \
--disablerepo "*" \
--enablerepo "extras" \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
--setopt=keepcache=False \
--best epel-release && \
dnf -y install \
--disablerepo "*" \
--enablerepo "${REPOLIST}" \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
--setopt=keepcache=False \
--best ${INSTALL_PKGS} && \
dnf -y reinstall \
--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 \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
--setopt=keepcache=False \
--best tzdata && \
tzdata && \
groupadd \
--system \
--gid 1995 \
@ -103,7 +105,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
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
EXPOSE 10051/TCP