Added caching / avoid orphans mechanisms

This commit is contained in:
Alexey Pustovalov
2024-02-18 23:27:03 +09:00
parent d197c8ccd3
commit 2d1df585ef
62 changed files with 186 additions and 206 deletions

View File

@ -48,7 +48,8 @@ COPY ["licenses", "/licenses"]
COPY ["conf/etc/", "/etc/"]
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
RUN set -eux && \
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
set -eux && \
INSTALL_PKGS="bash \
tzdata \
curl-minimal \
@ -78,6 +79,7 @@ RUN set -eux && \
--enablerepo "rhel-9-for-$ARCH_SUFFIX-appstream-rpms" \
--enablerepo "epel" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \
--setopt=tsflags=nodocs \
${INSTALL_PKGS} && \
@ -86,6 +88,7 @@ RUN set -eux && \
--setopt=install_weak_deps=0 \
--best \
--setopt=tsflags=nodocs \
--setopt=keepcache=0 \
tzdata && \
groupadd \
--system \
@ -131,9 +134,7 @@ RUN set -eux && \
microdnf -y remove \
findutils \
glibc-locale-source && \
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
microdnf -y clean all
EXPOSE 8080/TCP 8443/TCP