mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-08-09 00:24:58 +02:00
Add verification for binary Zabbix components after installing dependencies
This commit is contained in:
@ -91,6 +91,7 @@ RUN set -eux && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/
|
||||
/usr/sbin/zabbix_proxy -V
|
||||
|
||||
EXPOSE 10051/TCP
|
||||
|
||||
|
@ -36,6 +36,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "${ZABBIX_
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/", "/usr/bin/"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
--mount=type=tmpfs,target=/var/cache/yum/ \
|
||||
set -eux && \
|
||||
INSTALL_PKGS="bash \
|
||||
tini \
|
||||
@ -108,7 +109,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \
|
||||
microdnf -y clean all
|
||||
/usr/sbin/zabbix_proxy -V
|
||||
|
||||
EXPOSE 10051/TCP
|
||||
|
||||
|
@ -37,6 +37,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/", "/usr/bin
|
||||
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 \
|
||||
libevent \
|
||||
@ -95,7 +96,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \
|
||||
microdnf -y clean all
|
||||
/usr/sbin/zabbix_proxy -V
|
||||
|
||||
EXPOSE 10051/TCP
|
||||
|
||||
|
@ -55,6 +55,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "${ZABBIX_
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/", "/usr/bin/"]
|
||||
|
||||
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 \
|
||||
@ -128,7 +129,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \
|
||||
microdnf -y clean all
|
||||
/usr/sbin/zabbix_proxy -V
|
||||
|
||||
EXPOSE 10051/TCP
|
||||
|
||||
|
@ -35,7 +35,8 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/sbin/zabbix_proxy"
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "${ZABBIX_CONF_DIR}/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/", "/usr/bin/"]
|
||||
|
||||
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 \
|
||||
@ -93,7 +94,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \
|
||||
apt-get -y autoremove
|
||||
/usr/sbin/zabbix_proxy -V
|
||||
|
||||
EXPOSE 10051/TCP
|
||||
|
||||
|
Reference in New Issue
Block a user