-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using env variables for zabbix user home and configuration files dire…
…ctory
- Loading branch information
Showing
126 changed files
with
1,242 additions
and
1,344 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,9 @@ ARG ZBX_VERSION | |
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git | ||
|
||
ENV TERM=xterm \ | ||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} | ||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ | ||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \ | ||
ZABBIX_CONF_DIR="/etc/zabbix" | ||
|
||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <[email protected]>" \ | ||
org.opencontainers.image.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \ | ||
|
@@ -28,7 +30,7 @@ STOPSIGNAL SIGTERM | |
|
||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/sbin/zabbix_agentd", "/usr/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/", "/etc/zabbix/"] | ||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/conf/", "${ZABBIX_CONF_DIR}/"] | ||
|
||
RUN set -eux && \ | ||
INSTALL_PKGS="tini \ | ||
|
@@ -57,22 +59,22 @@ RUN set -eux && \ | |
--uid 1997 \ | ||
--ingroup zabbix \ | ||
--shell /sbin/nologin \ | ||
--home /var/lib/zabbix/ \ | ||
--home ${ZABBIX_USER_HOME_DIR} \ | ||
zabbix && \ | ||
mkdir -p /etc/zabbix && \ | ||
mkdir -p /etc/zabbix/zabbix_agentd.d && \ | ||
mkdir -p /var/lib/zabbix && \ | ||
mkdir -p /var/lib/zabbix/enc && \ | ||
mkdir -p /var/lib/zabbix/enc_internal && \ | ||
mkdir -p /var/lib/zabbix/modules && \ | ||
mkdir -p /var/lib/zabbix/user_scripts && \ | ||
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ | ||
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ | ||
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ | ||
mkdir -p ${ZABBIX_CONF_DIR} && \ | ||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agentd.d && \ | ||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \ | ||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \ | ||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \ | ||
mkdir -p ${ZABBIX_USER_HOME_DIR}/modules && \ | ||
mkdir -p ${ZABBIX_USER_HOME_DIR}/user_scripts && \ | ||
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}/ | ||
|
||
EXPOSE 10050/TCP | ||
|
||
WORKDIR /var/lib/zabbix | ||
WORKDIR ${ZABBIX_USER_HOME_DIR} | ||
|
||
COPY ["docker-entrypoint.sh", "/usr/bin/"] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,9 @@ ARG ZBX_VERSION | |
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git | ||
|
||
ENV TERM=xterm \ | ||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} | ||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ | ||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \ | ||
ZABBIX_CONF_DIR="/etc/zabbix" | ||
|
||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <[email protected]>" \ | ||
org.opencontainers.image.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \ | ||
|
@@ -28,7 +30,7 @@ STOPSIGNAL SIGTERM | |
|
||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/sbin/zabbix_agentd", "/usr/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/", "/etc/zabbix/"] | ||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/conf/", "${ZABBIX_CONF_DIR}/"] | ||
|
||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ | ||
set -eux && \ | ||
|
@@ -69,27 +71,28 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ | |
--gid 1995 \ | ||
zabbix && \ | ||
useradd \ | ||
--system --comment "Zabbix monitoring system" \ | ||
--system \ | ||
--comment "Zabbix monitoring system" \ | ||
-g zabbix \ | ||
--uid 1997 \ | ||
--shell /sbin/nologin \ | ||
--home-dir /var/lib/zabbix/ \ | ||
--home-dir ${ZABBIX_USER_HOME_DIR} \ | ||
zabbix && \ | ||
mkdir -p /etc/zabbix && \ | ||
mkdir -p /etc/zabbix/zabbix_agentd.d && \ | ||
mkdir -p /var/lib/zabbix && \ | ||
mkdir -p /var/lib/zabbix/enc && \ | ||
mkdir -p /var/lib/zabbix/enc_internal && \ | ||
mkdir -p /var/lib/zabbix/modules && \ | ||
mkdir -p /var/lib/zabbix/user_scripts && \ | ||
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ | ||
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ | ||
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ | ||
mkdir -p ZABBIX_CONF_DIR/ && \ | ||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agentd.d && \ | ||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \ | ||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \ | ||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \ | ||
mkdir -p ${ZABBIX_USER_HOME_DIR}/modules && \ | ||
mkdir -p ${ZABBIX_USER_HOME_DIR}/user_scripts && \ | ||
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 | ||
|
||
EXPOSE 10050/TCP | ||
|
||
WORKDIR /var/lib/zabbix | ||
WORKDIR ${ZABBIX_USER_HOME_DIR} | ||
|
||
COPY ["docker-entrypoint.sh", "/usr/bin/"] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,9 @@ ARG ZBX_VERSION | |
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git | ||
|
||
ENV TERM=xterm \ | ||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} | ||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ | ||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \ | ||
ZABBIX_CONF_DIR="/etc/zabbix" | ||
|
||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <[email protected]>" \ | ||
org.opencontainers.image.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \ | ||
|
@@ -61,23 +63,23 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ | |
-g zabbix \ | ||
--uid 1997 \ | ||
--shell /sbin/nologin \ | ||
--home-dir /var/lib/zabbix/ \ | ||
--home-dir ${ZABBIX_USER_HOME_DIR} \ | ||
zabbix && \ | ||
mkdir -p /etc/zabbix && \ | ||
mkdir -p /etc/zabbix/zabbix_agentd.d && \ | ||
mkdir -p /var/lib/zabbix && \ | ||
mkdir -p /var/lib/zabbix/enc && \ | ||
mkdir -p /var/lib/zabbix/enc_internal && \ | ||
mkdir -p /var/lib/zabbix/modules && \ | ||
mkdir -p /var/lib/zabbix/user_scripts && \ | ||
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ | ||
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ | ||
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ | ||
mkdir -p ZABBIX_CONF_DIR/ && \ | ||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agentd.d && \ | ||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \ | ||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \ | ||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \ | ||
mkdir -p ${ZABBIX_USER_HOME_DIR}/modules && \ | ||
mkdir -p ${ZABBIX_USER_HOME_DIR}/user_scripts && \ | ||
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 | ||
|
||
EXPOSE 10050/TCP | ||
|
||
WORKDIR /var/lib/zabbix | ||
WORKDIR ${ZABBIX_USER_HOME_DIR} | ||
|
||
COPY ["docker-entrypoint.sh", "/usr/bin/"] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,9 @@ ARG ZBX_VERSION | |
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git | ||
|
||
ENV TERM=xterm \ | ||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} | ||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ | ||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \ | ||
ZABBIX_CONF_DIR="/etc/zabbix" | ||
|
||
LABEL description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \ | ||
maintainer="[email protected]" \ | ||
|
@@ -47,7 +49,7 @@ STOPSIGNAL SIGTERM | |
COPY ["licenses", "/licenses"] | ||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/sbin/zabbix_agentd", "/usr/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/", "/etc/zabbix/"] | ||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/conf/", "${ZABBIX_CONF_DIR}/"] | ||
|
||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ | ||
set -eux && \ | ||
|
@@ -99,23 +101,23 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ | |
-g zabbix \ | ||
--uid 1997 \ | ||
--shell /sbin/nologin \ | ||
--home-dir /var/lib/zabbix/ \ | ||
--home-dir ${ZABBIX_USER_HOME_DIR} \ | ||
zabbix && \ | ||
mkdir -p /etc/zabbix && \ | ||
mkdir -p /etc/zabbix/zabbix_agentd.d && \ | ||
mkdir -p /var/lib/zabbix && \ | ||
mkdir -p /var/lib/zabbix/enc && \ | ||
mkdir -p /var/lib/zabbix/enc_internal && \ | ||
mkdir -p /var/lib/zabbix/modules && \ | ||
mkdir -p /var/lib/zabbix/user_scripts && \ | ||
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ | ||
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ | ||
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ | ||
mkdir -p ZABBIX_CONF_DIR/ && \ | ||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agentd.d && \ | ||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \ | ||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \ | ||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \ | ||
mkdir -p ${ZABBIX_USER_HOME_DIR}/modules && \ | ||
mkdir -p ${ZABBIX_USER_HOME_DIR}/user_scripts && \ | ||
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 | ||
|
||
EXPOSE 10050/TCP | ||
|
||
WORKDIR /var/lib/zabbix | ||
WORKDIR ${ZABBIX_USER_HOME_DIR} | ||
|
||
COPY ["docker-entrypoint.sh", "/usr/bin/"] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,9 @@ ARG ZBX_VERSION | |
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git | ||
|
||
ENV TERM=xterm \ | ||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} | ||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ | ||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \ | ||
ZABBIX_CONF_DIR="/etc/zabbix" | ||
|
||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <[email protected]>" \ | ||
org.opencontainers.image.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \ | ||
|
@@ -28,7 +30,7 @@ STOPSIGNAL SIGTERM | |
|
||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/sbin/zabbix_agentd", "/usr/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/", "/etc/zabbix/"] | ||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/conf/", "${ZABBIX_CONF_DIR}/"] | ||
|
||
RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ | ||
set -eux && \ | ||
|
@@ -57,24 +59,24 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ | |
-g zabbix \ | ||
--uid 1997 \ | ||
--shell /sbin/nologin \ | ||
--home-dir /var/lib/zabbix/ \ | ||
--home-dir ${ZABBIX_USER_HOME_DIR} \ | ||
zabbix && \ | ||
mkdir -p /etc/zabbix && \ | ||
mkdir -p /etc/zabbix/zabbix_agentd.d && \ | ||
mkdir -p /var/lib/zabbix && \ | ||
mkdir -p /var/lib/zabbix/enc && \ | ||
mkdir -p /var/lib/zabbix/enc_internal && \ | ||
mkdir -p /var/lib/zabbix/modules && \ | ||
mkdir -p /var/lib/zabbix/user_scripts && \ | ||
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ | ||
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ | ||
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ | ||
mkdir -p ${ZABBIX_CONF_DIR} && \ | ||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agentd.d && \ | ||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \ | ||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \ | ||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \ | ||
mkdir -p ${ZABBIX_USER_HOME_DIR}/modules && \ | ||
mkdir -p ${ZABBIX_USER_HOME_DIR}/user_scripts && \ | ||
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 && \ | ||
apt-get -y clean | ||
|
||
EXPOSE 10050/TCP | ||
|
||
WORKDIR /var/lib/zabbix | ||
WORKDIR ${ZABBIX_USER_HOME_DIR} | ||
|
||
COPY ["docker-entrypoint.sh", "/usr/bin/"] | ||
|
||
|
Oops, something went wrong.