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-mysql: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
@ -30,17 +30,18 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/java_gateway/sbin/", "/u
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
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 \
--setopt=keepcache=False \
--best ${INSTALL_PKGS} && \
--enablerepo "baseos" \
--enablerepo "appstream" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \
--nodocs ${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
@ -61,7 +62,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
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
EXPOSE 10052/TCP