Add verification for binary Zabbix components after installing dependencies

This commit is contained in:
Alexey Pustovalov
2024-12-25 14:28:21 +09:00
parent 9c9cf0acf6
commit f2e6dd4e1e
61 changed files with 126 additions and 107 deletions

View File

@ -31,6 +31,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
COPY ["conf/etc/", "/etc/"]
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--mount=type=tmpfs,target=/var/cache/yum/ \
set -eux && \
INSTALL_PKGS="bash \
curl-minimal \
@ -120,8 +121,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
chmod -R g=u /var/lib/php/session/ && \
microdnf -y remove \
findutils \
glibc-locale-source && \
microdnf -y clean all
glibc-locale-source
EXPOSE 8080/TCP 8443/TCP

View File

@ -32,6 +32,7 @@ COPY ["conf/etc/", "/etc/"]
COPY ["conf/etc/yum.repos.d/oracle-epel-ol9.repo", "/etc/yum.repos.d/oracle-epel-ol9.repo"]
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--mount=type=tmpfs,target=/var/cache/yum/ \
set -eux && \
INSTALL_PKGS="bash \
curl \
@ -107,8 +108,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
chmod -R g=u /var/lib/php/session/ && \
microdnf -y remove \
findutils \
glibc-locale-source && \
microdnf -y clean all
glibc-locale-source
EXPOSE 8080/TCP 8443/TCP

View File

@ -50,6 +50,7 @@ COPY ["conf/etc/", "/etc/"]
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--mount=type=tmpfs,target=/var/cache/yum/ \
--mount=type=bind,target=/run/secrets/,src=secrets/ \
set -eux && \
INSTALL_PKGS="bash \
@ -151,8 +152,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
chmod -R g=u /var/lib/php/session/ && \
microdnf -y remove \
findutils \
glibc-locale-source && \
microdnf -y clean all
glibc-locale-source
EXPOSE 8080/TCP 8443/TCP

View File

@ -30,7 +30,8 @@ STOPSIGNAL SIGTERM
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
COPY ["conf/etc/", "/etc/"]
RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \
RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
--mount=type=cache,target=/var/lib/apt/,sharing=locked \
set -eux && \
echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \
INSTALL_PKGS="bash \
@ -99,9 +100,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \
chmod -R g=u /etc/nginx/ /etc/php/8.3/fpm/php-fpm.conf /etc/php/8.3/fpm/pool.d/ && \
chown --quiet -R zabbix:root /var/lib/php/session/ && \
chgrp -R 0 /var/lib/php/session/ && \
chmod -R g=u /var/lib/php/session/ && \
apt-get -y autoremove && \
apt-get -y clean
chmod -R g=u /var/lib/php/session/
EXPOSE 8080/TCP 8443/TCP