Skip to content

Commit

Permalink
Add verification for binary Zabbix components after installing depend…
Browse files Browse the repository at this point in the history
…encies
  • Loading branch information
dotneft committed Dec 25, 2024
1 parent 397aeef commit b7cb725
Show file tree
Hide file tree
Showing 61 changed files with 135 additions and 111 deletions.
3 changes: 2 additions & 1 deletion Dockerfiles/agent/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ RUN set -eux && \
${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf \
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
${ZABBIX_USER_HOME_DIR}/ && \
chmod g=u ${ZABBIX_CONF_DIR}
chmod g=u ${ZABBIX_CONF_DIR} && \
/usr/sbin/zabbix_agentd -V

EXPOSE 10050/TCP

Expand Down
3 changes: 2 additions & 1 deletion Dockerfiles/agent/centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bi
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/conf/", "${ZABBIX_CONF_DIR}/"]

RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--mount=type=tmpfs,target=/var/cache/yum/ \
set -eux && \
INSTALL_PKGS="bash \
iputils \
Expand Down Expand Up @@ -99,7 +100,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
${ZABBIX_USER_HOME_DIR}/ && \
chmod g=u ${ZABBIX_CONF_DIR} && \
microdnf -y clean all
/usr/sbin/zabbix_agentd -V

EXPOSE 10050/TCP

Expand Down
3 changes: 2 additions & 1 deletion Dockerfiles/agent/ol/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/conf/", "${ZABBIX_
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 \
iputils \
Expand Down Expand Up @@ -87,7 +88,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
${ZABBIX_USER_HOME_DIR}/ && \
chmod g=u ${ZABBIX_CONF_DIR} && \
microdnf -y clean all
/usr/sbin/zabbix_agentd -V

EXPOSE 10050/TCP

Expand Down
3 changes: 2 additions & 1 deletion Dockerfiles/agent/rhel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bi
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/conf/", "${ZABBIX_CONF_DIR}/"]

RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--mount=type=tmpfs,target=/var/cache/yum/ \
set -eux && \
INSTALL_PKGS="bash \
iputils \
Expand Down Expand Up @@ -125,7 +126,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
${ZABBIX_USER_HOME_DIR}/ && \
chmod g=u ${ZABBIX_CONF_DIR} && \
microdnf -y clean all
/usr/sbin/zabbix_agentd -V

EXPOSE 10050/TCP

Expand Down
6 changes: 3 additions & 3 deletions Dockerfiles/agent/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/sbin/zabbix_agentd
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/conf/", "${ZABBIX_CONF_DIR}/"]

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 \
Expand Down Expand Up @@ -83,8 +84,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
${ZABBIX_USER_HOME_DIR}/ && \
chmod g=u ${ZABBIX_CONF_DIR} && \
apt-get -y autoremove && \
apt-get -y clean
/usr/sbin/zabbix_agentd -V

EXPOSE 10050/TCP

Expand Down
3 changes: 2 additions & 1 deletion Dockerfiles/agent2/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ RUN set -eux && \
chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
${ZABBIX_USER_HOME_DIR}/ && \
chmod g=u ${ZABBIX_CONF_DIR}
chmod g=u ${ZABBIX_CONF_DIR} && \
/usr/sbin/zabbix_agent2 -V

EXPOSE 10050/TCP 31999/TCP

Expand Down
3 changes: 2 additions & 1 deletion Dockerfiles/agent2/centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bi
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/conf/", "${ZABBIX_CONF_DIR}/"]

RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--mount=type=tmpfs,target=/var/cache/yum/ \
set -eux && \
INSTALL_PKGS="bash \
iputils \
Expand Down Expand Up @@ -98,7 +99,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
${ZABBIX_USER_HOME_DIR}/ && \
chmod g=u ${ZABBIX_CONF_DIR} && \
microdnf -y clean all
/usr/sbin/zabbix_agent2 -V

EXPOSE 10050/TCP 31999/TCP

Expand Down
3 changes: 2 additions & 1 deletion Dockerfiles/agent2/ol/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/conf/", "${ZABBIX
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 \
iputils \
Expand Down Expand Up @@ -85,7 +86,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
${ZABBIX_USER_HOME_DIR}/ && \
chmod g=u ${ZABBIX_CONF_DIR} && \
microdnf -y clean all
/usr/sbin/zabbix_agent2 -V

EXPOSE 10050/TCP 31999/TCP

Expand Down
3 changes: 2 additions & 1 deletion Dockerfiles/agent2/rhel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bi
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/conf/", "${ZABBIX_CONF_DIR}/"]

RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--mount=type=tmpfs,target=/var/cache/yum/ \
set -eux && \
INSTALL_PKGS="bash \
iputils \
Expand Down Expand Up @@ -119,7 +120,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
${ZABBIX_USER_HOME_DIR}/ && \
chmod g=u ${ZABBIX_CONF_DIR} && \
microdnf -y clean all
/usr/sbin/zabbix_agent2 -V

EXPOSE 10050/TCP 31999/TCP

Expand Down
6 changes: 3 additions & 3 deletions Dockerfiles/agent2/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/sbin/", "/usr/sbi
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/conf/", "${ZABBIX_CONF_DIR}/"]

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 \
Expand Down Expand Up @@ -81,8 +82,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
${ZABBIX_USER_HOME_DIR}/ && \
chmod g=u ${ZABBIX_CONF_DIR} && \
apt-get -y autoremove && \
apt-get -y clean
/usr/sbin/zabbix_agent2 -V

EXPOSE 10050/TCP 31999/TCP

Expand Down
4 changes: 2 additions & 2 deletions Dockerfiles/build-base/centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
org.opencontainers.image.version="${ZBX_VERSION}"

RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--mount=type=tmpfs,target=/var/cache/yum/ \
set -eux && \
INSTALL_PKGS="autoconf \
automake \
Expand Down Expand Up @@ -69,5 +70,4 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \
--nodocs ${INSTALL_PKGS} && \
microdnf -y clean all
--nodocs ${INSTALL_PKGS}
4 changes: 2 additions & 2 deletions Dockerfiles/build-base/ol/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
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="autoconf \
automake \
Expand Down Expand Up @@ -63,5 +64,4 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \
--nodocs ${INSTALL_PKGS} && \
microdnf -y clean all
--nodocs ${INSTALL_PKGS}
4 changes: 2 additions & 2 deletions Dockerfiles/build-base/rhel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ LABEL description="Prepared environment to build Zabbix components" \
COPY ["licenses", "/licenses"]

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="autoconf \
Expand Down Expand Up @@ -82,5 +83,4 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--setopt=keepcache=0 \
--best \
--setopt=tsflags=nodocs \
${INSTALL_PKGS} && \
microdnf -y clean all
${INSTALL_PKGS}
6 changes: 2 additions & 4 deletions Dockerfiles/build-base/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
org.opencontainers.image.vendor="Zabbix SIA" \
org.opencontainers.image.version="${ZBX_VERSION}"

RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
--mount=type=cache,target=/var/lib/apt/,sharing=locked \
set -eux && \
INSTALL_PKGS="bash \
Expand Down Expand Up @@ -52,6 +52,4 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
--no-install-recommends install \
${INSTALL_PKGS} && \
apt-get -y autoremove && \
apt-get -y clean
${INSTALL_PKGS}
4 changes: 2 additions & 2 deletions Dockerfiles/java-gateway/centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ STOPSIGNAL SIGTERM
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/java_gateway/sbin/", "/usr/sbin/zabbix_java/"]

RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--mount=type=tmpfs,target=/var/cache/yum/ \
set -eux && \
INSTALL_PKGS="bash \
shadow-utils \
Expand Down Expand Up @@ -61,8 +62,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
mv /usr/sbin/zabbix_java/lib/logback-console.xml /etc/zabbix/zabbix_java_gateway_logback.xml && \
chown --quiet -R zabbix:root /etc/zabbix/ /usr/sbin/zabbix_java/ && \
chgrp -R 0 /etc/zabbix/ /usr/sbin/zabbix_java/ && \
chmod -R g=u /etc/zabbix/ /usr/sbin/zabbix_java/ && \
microdnf -y clean all
chmod -R g=u /etc/zabbix/ /usr/sbin/zabbix_java/

EXPOSE 10052/TCP

Expand Down
4 changes: 2 additions & 2 deletions Dockerfiles/java-gateway/ol/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ STOPSIGNAL SIGTERM
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/java_gateway/sbin/", "/usr/sbin/zabbix_java/"]

RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--mount=type=tmpfs,target=/var/cache/yum/ \
set -eux && \
INSTALL_PKGS="bash \
java-17-openjdk-headless \
Expand Down Expand Up @@ -61,8 +62,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
mv /usr/sbin/zabbix_java/lib/logback-console.xml /etc/zabbix/zabbix_java_gateway_logback.xml && \
chown --quiet -R zabbix:root /etc/zabbix/ /usr/sbin/zabbix_java/ && \
chgrp -R 0 /etc/zabbix/ /usr/sbin/zabbix_java/ && \
chmod -R g=u /etc/zabbix/ /usr/sbin/zabbix_java/ && \
microdnf -y clean all
chmod -R g=u /etc/zabbix/ /usr/sbin/zabbix_java/

EXPOSE 10052/TCP

Expand Down
4 changes: 2 additions & 2 deletions Dockerfiles/java-gateway/rhel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ COPY ["licenses", "/licenses"]
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/java_gateway/sbin/", "/usr/sbin/zabbix_java/"]

RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--mount=type=tmpfs,target=/var/cache/yum/ \
set -eux && \
INSTALL_PKGS="bash \
findutils \
Expand Down Expand Up @@ -82,8 +83,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
mv /usr/sbin/zabbix_java/lib/logback-console.xml /etc/zabbix/zabbix_java_gateway_logback.xml && \
chown --quiet -R zabbix:root /etc/zabbix/ /usr/sbin/zabbix_java/ && \
chgrp -R 0 /etc/zabbix/ /usr/sbin/zabbix_java/ && \
chmod -R g=u /etc/zabbix/ /usr/sbin/zabbix_java/ && \
microdnf -y clean all
chmod -R g=u /etc/zabbix/ /usr/sbin/zabbix_java/

EXPOSE 10052/TCP

Expand Down
7 changes: 3 additions & 4 deletions Dockerfiles/java-gateway/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ STOPSIGNAL SIGTERM

COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/java_gateway/sbin/", "/usr/sbin/zabbix_java/"]

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 \
Expand Down Expand Up @@ -56,9 +57,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \
mv /usr/sbin/zabbix_java/lib/logback-console.xml /etc/zabbix/zabbix_java_gateway_logback.xml && \
chown --quiet -R zabbix:root /etc/zabbix/ /usr/sbin/zabbix_java/ && \
chgrp -R 0 /etc/zabbix/ /usr/sbin/zabbix_java/ && \
chmod -R g=u /etc/zabbix/ /usr/sbin/zabbix_java/ && \
apt-get -y autoremove && \
apt-get -y clean
chmod -R g=u /etc/zabbix/ /usr/sbin/zabbix_java/

EXPOSE 10052/TCP

Expand Down
3 changes: 2 additions & 1 deletion Dockerfiles/proxy-mysql/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ RUN set -eux && \
chgrp -R 0 ${ZABBIX_CONF_DIR}/zabbix_proxy_modules.conf ${ZABBIX_USER_HOME_DIR} && \
chgrp 0 ${ZABBIX_CONF_DIR} && \
chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_proxy_modules.conf ${ZABBIX_USER_HOME_DIR} && \
chmod g=u ${ZABBIX_CONF_DIR}
chmod g=u ${ZABBIX_CONF_DIR} && \
/usr/sbin/zabbix_proxy -V

EXPOSE 10051/TCP

Expand Down
3 changes: 2 additions & 1 deletion Dockerfiles/proxy-mysql/centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "${ZABBIX_
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/database/mysql/", "/usr/share/doc/zabbix-proxy-mysql/"]

RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--mount=type=tmpfs,target=/var/cache/yum/ \
set -eux && \
INSTALL_PKGS="bash \
libevent \
Expand Down Expand Up @@ -123,7 +124,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
chgrp 0 ${ZABBIX_CONF_DIR} && \
chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_proxy_modules.conf ${ZABBIX_USER_HOME_DIR} && \
chmod g=u ${ZABBIX_CONF_DIR} && \
microdnf -y clean all
/usr/sbin/zabbix_proxy -V

EXPOSE 10051/TCP

Expand Down
3 changes: 2 additions & 1 deletion Dockerfiles/proxy-mysql/ol/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/database/mysql/",
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 \
Expand Down Expand Up @@ -110,7 +111,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
chgrp 0 ${ZABBIX_CONF_DIR} && \
chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_proxy_modules.conf ${ZABBIX_USER_HOME_DIR} && \
chmod g=u ${ZABBIX_CONF_DIR} && \
microdnf -y clean all
/usr/sbin/zabbix_proxy -V

EXPOSE 10051/TCP

Expand Down
3 changes: 2 additions & 1 deletion Dockerfiles/proxy-mysql/rhel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "${ZABBIX_
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/database/mysql/", "/usr/share/doc/zabbix-proxy-mysql/"]

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 \
Expand Down Expand Up @@ -152,7 +153,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
chgrp 0 ${ZABBIX_CONF_DIR} && \
chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_proxy_modules.conf ${ZABBIX_USER_HOME_DIR} && \
chmod g=u ${ZABBIX_CONF_DIR} && \
microdnf -y clean all
/usr/sbin/zabbix_proxy -V


EXPOSE 10051/TCP
Expand Down
6 changes: 3 additions & 3 deletions Dockerfiles/proxy-mysql/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bi
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "${ZABBIX_CONF_DIR}/"]
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/database/mysql/", "/usr/share/doc/zabbix-proxy-mysql/"]

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 \
Expand Down Expand Up @@ -107,8 +108,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \
chgrp 0 ${ZABBIX_CONF_DIR} && \
chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_proxy_modules.conf ${ZABBIX_USER_HOME_DIR} && \
chmod g=u ${ZABBIX_CONF_DIR} && \
apt-get -y autoremove && \
apt-get -y clean
/usr/sbin/zabbix_proxy -V

EXPOSE 10051/TCP

Expand Down
3 changes: 2 additions & 1 deletion Dockerfiles/proxy-sqlite3/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ RUN set -eux && \
chgrp -R 0 ${ZABBIX_CONF_DIR}/zabbix_proxy_modules.conf ${ZABBIX_USER_HOME_DIR} && \
chgrp 0 ${ZABBIX_CONF_DIR} && \
chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_proxy_modules.conf ${ZABBIX_USER_HOME_DIR} && \
chmod g=u ${ZABBIX_CONF_DIR}
chmod g=u ${ZABBIX_CONF_DIR} && \
/usr/sbin/zabbix_proxy -V

EXPOSE 10051/TCP

Expand Down
Loading

0 comments on commit b7cb725

Please sign in to comment.