mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-08-10 00:47:51 +02:00
Added caching / avoid orphans mechanisms
This commit is contained in:
@ -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,7 +31,6 @@ COPY ["conf/etc/", "/etc/"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
set -eux && \
|
||||
REPOLIST="baseos,appstream,epel" && \
|
||||
INSTALL_PKGS="bash \
|
||||
curl-minimal \
|
||||
mysql \
|
||||
@ -46,15 +45,31 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
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 \
|
||||
@ -95,10 +110,10 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
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
|
||||
|
||||
EXPOSE 8080/TCP 8443/TCP
|
||||
|
||||
|
Reference in New Issue
Block a user