mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-06-30 14:51:11 +02:00
Added caching / avoid orphans mechanisms
This commit is contained in:
@ -100,8 +100,7 @@ RUN set -eux && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root /etc/apache2/ /etc/php81/ && \
|
||||
chgrp -R 0 /etc/apache2/ /etc/php81/ && \
|
||||
chmod -R g=u /etc/apache2/ /etc/php81/ && \
|
||||
rm -rf /var/cache/apk/*
|
||||
chmod -R g=u /etc/apache2/ /etc/php81/
|
||||
|
||||
EXPOSE 8080/TCP 8443/TCP
|
||||
|
||||
|
@ -29,7 +29,8 @@ STOPSIGNAL SIGTERM
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
|
||||
COPY ["conf/etc/", "/etc/"]
|
||||
|
||||
RUN set -eux && \
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
set -eux && \
|
||||
INSTALL_PKGS="bash \
|
||||
curl-minimal \
|
||||
httpd \
|
||||
@ -117,9 +118,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
|
||||
|
||||
|
@ -30,7 +30,8 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
|
||||
COPY ["conf/etc/", "/etc/"]
|
||||
COPY ["conf/etc/yum.repos.d/oracle-epel-ol9.repo", "/etc/yum.repos.d/oracle-epel-ol9.repo"]
|
||||
|
||||
RUN set -eux && \
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
set -eux && \
|
||||
INSTALL_PKGS="bash \
|
||||
curl \
|
||||
httpd \
|
||||
@ -54,6 +55,7 @@ RUN set -eux && \
|
||||
--enablerepo="ol9_appstream" \
|
||||
--enablerepo="ol9_developer_EPEL" \
|
||||
--setopt=install_weak_deps=0 \
|
||||
--setopt=keepcache=0 \
|
||||
--best \
|
||||
--nodocs \
|
||||
${INSTALL_PKGS} && \
|
||||
@ -103,9 +105,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
|
||||
|
||||
|
@ -29,7 +29,8 @@ STOPSIGNAL SIGTERM
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
|
||||
COPY ["conf/etc/", "/etc/"]
|
||||
|
||||
RUN set -eux && \
|
||||
RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \
|
||||
set -eux && \
|
||||
echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \
|
||||
INSTALL_PKGS="bash \
|
||||
apache2 \
|
||||
@ -100,8 +101,7 @@ RUN set -eux && \
|
||||
chgrp -R 0 /etc/apache2/ /etc/php/8.1/ && \
|
||||
chmod -R g=u /etc/apache2/ /etc/php/8.1/ && \
|
||||
apt-get -y autoremove && \
|
||||
apt-get -y clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
apt-get -y clean
|
||||
|
||||
EXPOSE 8080/TCP 8443/TCP
|
||||
|
||||
|
Reference in New Issue
Block a user