mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2024-11-28 10:43:10 +01:00
Updated build output structure
This commit is contained in:
parent
dcf4ac39c8
commit
52462c056e
2
.env
2
.env
@ -24,6 +24,8 @@ MYSQL_IMAGE=mysql
|
||||
MYSQL_IMAGE_TAG=8.0-oracle
|
||||
POSTGRESQL_IMAGE=postgres
|
||||
POSTGRESQL_IMAGE_TAG=13-alpine
|
||||
#POSTGRESQL_IMAGE=timescale/timescaledb
|
||||
#POSTGRESQL_IMAGE_TAG=2.14.2-pg13
|
||||
|
||||
ELASTICSEARCH_IMAGE=elasticsearch
|
||||
ELASTICSEARCH_IMAGE_TAG=latest
|
||||
|
@ -26,10 +26,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd", "/usr/sbin/zabbix_agentd"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_agentd.conf", "/etc/zabbix/zabbix_agentd.conf"]
|
||||
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/"]
|
||||
|
||||
RUN set -eux && \
|
||||
INSTALL_PKGS="tini \
|
||||
|
@ -26,10 +26,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd", "/usr/sbin/zabbix_agentd"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_agentd.conf", "/etc/zabbix/zabbix_agentd.conf"]
|
||||
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/"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
set -eux && \
|
||||
|
@ -26,10 +26,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd", "/usr/sbin/zabbix_agentd"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_agentd.conf", "/etc/zabbix/zabbix_agentd.conf"]
|
||||
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 ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
|
@ -45,10 +45,9 @@ LABEL description="Zabbix agent is deployed on a monitoring target to actively m
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY ["licenses", "/licenses"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd", "/usr/sbin/zabbix_agentd"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_agentd.conf", "/etc/zabbix/zabbix_agentd.conf"]
|
||||
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/"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
set -eux && \
|
||||
|
@ -26,10 +26,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd", "/usr/sbin/zabbix_agentd"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_agentd.conf", "/etc/zabbix/zabbix_agentd.conf"]
|
||||
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/"]
|
||||
|
||||
RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \
|
||||
set -eux && \
|
||||
|
@ -28,7 +28,7 @@ SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop';"]
|
||||
|
||||
WORKDIR C:\zabbix\
|
||||
|
||||
COPY --from=builder ["C:\\zabbix_output", "C:\\zabbix"]
|
||||
COPY --from=builder ["C:\\zabbix-${ZBX_VERSION}-output", "C:\\zabbix"]
|
||||
COPY [".\\docker-entrypoint.ps1", "C:\\zabbix"]
|
||||
|
||||
USER ContainerAdministrator
|
||||
|
@ -26,10 +26,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2", "/usr/sbin/zabbix_agent2"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.conf", "/etc/zabbix/zabbix_agent2.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/sbin/zabbix_agent2", "/usr/sbin/zabbix_agent2"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/conf/", "/etc/zabbix/"]
|
||||
|
||||
RUN set -eux && \
|
||||
INSTALL_PKGS="tini \
|
||||
|
@ -26,10 +26,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2", "/usr/sbin/zabbix_agent2"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.conf", "/etc/zabbix/zabbix_agent2.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/sbin/zabbix_agent2", "/usr/sbin/zabbix_agent2"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/conf/", "/etc/zabbix/"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
set -eux && \
|
||||
|
@ -26,10 +26,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2", "/usr/sbin/zabbix_agent2"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.conf", "/etc/zabbix/zabbix_agent2.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/sbin/zabbix_agent2", "/usr/sbin/zabbix_agent2"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/conf/", "/etc/zabbix/"]
|
||||
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
|
@ -45,10 +45,9 @@ LABEL description="Zabbix agent 2 is deployed on a monitoring target to actively
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY ["licenses", "/licenses"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2", "/usr/sbin/zabbix_agent2"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.conf", "/etc/zabbix/zabbix_agent2.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/sbin/zabbix_agent2", "/usr/sbin/zabbix_agent2"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/conf/", "/etc/zabbix/"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
set -eux && \
|
||||
|
@ -26,10 +26,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2", "/usr/sbin/zabbix_agent2"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.conf", "/etc/zabbix/zabbix_agent2.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/sbin/zabbix_agent2", "/usr/sbin/zabbix_agent2"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/conf/", "/etc/zabbix/"]
|
||||
|
||||
RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \
|
||||
set -eux && \
|
||||
|
@ -28,7 +28,7 @@ SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop';"]
|
||||
|
||||
WORKDIR C:\zabbix\
|
||||
|
||||
COPY --from=builder ["C:\\zabbix_output", "C:\\zabbix"]
|
||||
COPY --from=builder ["C:\\zabbix-${ZBX_VERSION}-output", "C:\\zabbix"]
|
||||
COPY [".\\docker-entrypoint.ps1", "C:\\zabbix"]
|
||||
|
||||
USER ContainerAdministrator
|
||||
|
@ -218,12 +218,12 @@ function Prepare-Zbx-Agent-Config {
|
||||
}
|
||||
|
||||
function Prepare-Zbx-Agent-Plugins-Config {
|
||||
Write-Host "** Preparing Zabbix agent 2 (plugins) configuration file"
|
||||
Write-Host "** Preparing Zabbix agent 2 (plugins) configuration files"
|
||||
|
||||
$ZbxAgentConfig="$ZabbixConfigDir\zabbix_agent2.conf"
|
||||
|
||||
# Update-Config-Var $ZbxAgentConfig "Plugins.MongoDB.System.Path" "$ZabbixUserHomeDir\zabbix-agent2-plugin\zabbix-agent2-plugin-mongodb.exe"
|
||||
# Update-Config-Var $ZbxAgentConfig "Plugins.PostgreSQL.System.Path" "$ZabbixUserHomeDir\zabbix-agent2-plugin\zabbix-agent2-plugin-postgresql.exe"
|
||||
Update-Config-Var "$ZabbixConfigDir/mongodb.conf" "Plugins.MongoDB.System.Path" "$ZabbixUserHomeDir\zabbix-agent2-plugin\mongodb.exe"
|
||||
Update-Config-Var "$ZabbixConfigDir/postgresql.conf" "Plugins.PostgreSQL.System.Path" "$ZabbixUserHomeDir\zabbix-agent2-plugin\postgresql.exe"
|
||||
Update-Config-Var "$ZabbixConfigDir/mssql.conf" "Plugins.MSSQL.System.Path" "$ZabbixUserHomeDir\zabbix-agent2-plugin\mssql.exe"
|
||||
Update-Config-Var "$ZabbixConfigDir/ember.conf" "Plugins.EmberPlus.System.Path" "$ZabbixUserHomeDir\zabbix-agent2-plugin\ember-plus.exe"
|
||||
}
|
||||
|
||||
function PrepareAgent {
|
||||
|
@ -20,6 +20,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
org.opencontainers.image.vendor="Zabbix SIA" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_VERSION}-output \
|
||||
DB_TYPE=mysql
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
--mount=type=cache,target=/root/go/ \
|
||||
set -eux && \
|
||||
@ -43,8 +46,22 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
*) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \
|
||||
esac; \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
|
||||
cd /tmp/zabbix-${ZBX_VERSION} && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/database/${DB_TYPE}/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
|
||||
cd ${ZBX_SOURCES_DIR} && \
|
||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/go/pkg/version/version.go && \
|
||||
@ -65,7 +82,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
--with-ldap \
|
||||
--with-libcurl \
|
||||
--with-libxml2 \
|
||||
--with-mysql \
|
||||
--with-${DB_TYPE} \
|
||||
--with-net-snmp \
|
||||
--with-openipmi \
|
||||
--with-openssl \
|
||||
@ -76,26 +93,38 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
make -j"$(nproc)" -s dbschema && \
|
||||
make -j"$(nproc)" -s && \
|
||||
make -j"$(nproc)" -s gettext && \
|
||||
cat database/mysql/schema.sql > database/mysql/create.sql && \
|
||||
cat database/mysql/images.sql >> database/mysql/create.sql && \
|
||||
cat database/mysql/data.sql >> database/mysql/create.sql && \
|
||||
gzip -c database/mysql/create.sql > database/mysql/create_server.sql.gz && \
|
||||
rm -rf database/mysql/create.sql && \
|
||||
cat database/mysql/schema.sql > database/mysql/create.sql && \
|
||||
gzip -c database/mysql/create.sql > database/mysql/create_proxy.sql.gz && \
|
||||
rm -rf database/mysql/create.sql && \
|
||||
cat database/${DB_TYPE}/schema.sql > database/${DB_TYPE}/create.sql && \
|
||||
gzip -c database/${DB_TYPE}/create.sql > ${ZBX_OUTPUT_DIR}/proxy/database/${DB_TYPE}/create.sql.gz && \
|
||||
cat database/${DB_TYPE}/images.sql >> database/${DB_TYPE}/create.sql && \
|
||||
cat database/${DB_TYPE}/data.sql >> database/${DB_TYPE}/create.sql && \
|
||||
gzip -c database/${DB_TYPE}/create.sql > ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/create.sql.gz && \
|
||||
rm -rf database/${DB_TYPE}/create.sql && \
|
||||
mkdir /tmp/fonts/ && \
|
||||
curl --tlsv1.2 -sSf -L "https://noto-website.storage.googleapis.com/pkgs/NotoSansCJKjp-hinted.zip" -o /tmp/fonts/NotoSansCJKjp-hinted.zip && \
|
||||
unzip /tmp/fonts/NotoSansCJKjp-hinted.zip -d /tmp/fonts/ && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/ && \
|
||||
rm -f /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" /tmp/zabbix-${ZBX_VERSION}/ui/include/defines.inc.php && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf ${ZBX_SOURCES_DIR}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt ${ZBX_SOURCES_DIR}/ui/assets/fonts/ && \
|
||||
rm -f ${ZBX_SOURCES_DIR}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" ${ZBX_SOURCES_DIR}/ui/include/defines.inc.php && \
|
||||
rm -rf /tmp/fonts/ && \
|
||||
chmod o+r /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/* && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_server/zabbix_server && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2 && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
|
||||
chmod o+r ${ZBX_SOURCES_DIR}/ui/assets/fonts/* && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_server/zabbix_server && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_agentd.conf ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/conf/zabbix_agentd/ ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_agent2.conf ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_server/zabbix_server ${ZBX_OUTPUT_DIR}/server/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_server.conf ${ZBX_OUTPUT_DIR}/server/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_proxy.conf ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/bin/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/lib/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
make -s distclean
|
||||
|
@ -20,6 +20,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
org.opencontainers.image.vendor="Zabbix SIA" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_VERSION}-output \
|
||||
DB_TYPE=mysql
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
--mount=type=cache,target=/root/go/ \
|
||||
set -eux && \
|
||||
@ -37,8 +40,23 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
*) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \
|
||||
esac; \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
|
||||
cd /tmp/zabbix-${ZBX_VERSION} && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/database/${DB_TYPE}/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
|
||||
cd ${ZBX_SOURCES_DIR} && \
|
||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/go/pkg/version/version.go && \
|
||||
@ -59,7 +77,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
--with-ldap \
|
||||
--with-libcurl \
|
||||
--with-libxml2 \
|
||||
--with-mysql \
|
||||
--with-${DB_TYPE} \
|
||||
--with-net-snmp \
|
||||
--with-openipmi \
|
||||
--with-openssl \
|
||||
@ -70,26 +88,38 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
make -j"$(nproc)" -s dbschema && \
|
||||
make -j"$(nproc)" -s && \
|
||||
make -j"$(nproc)" -s gettext && \
|
||||
cat database/mysql/schema.sql > database/mysql/create.sql && \
|
||||
cat database/mysql/images.sql >> database/mysql/create.sql && \
|
||||
cat database/mysql/data.sql >> database/mysql/create.sql && \
|
||||
gzip -c database/mysql/create.sql > database/mysql/create_server.sql.gz && \
|
||||
rm -rf database/mysql/create.sql && \
|
||||
cat database/mysql/schema.sql > database/mysql/create.sql && \
|
||||
gzip -c database/mysql/create.sql > database/mysql/create_proxy.sql.gz && \
|
||||
rm -rf database/mysql/create.sql && \
|
||||
cat database/${DB_TYPE}/schema.sql > database/${DB_TYPE}/create.sql && \
|
||||
gzip -c database/${DB_TYPE}/create.sql > ${ZBX_OUTPUT_DIR}/proxy/database/${DB_TYPE}/create.sql.gz && \
|
||||
cat database/${DB_TYPE}/images.sql >> database/${DB_TYPE}/create.sql && \
|
||||
cat database/${DB_TYPE}/data.sql >> database/${DB_TYPE}/create.sql && \
|
||||
gzip -c database/${DB_TYPE}/create.sql > ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/create.sql.gz && \
|
||||
rm -rf database/${DB_TYPE}/create.sql && \
|
||||
mkdir /tmp/fonts/ && \
|
||||
curl --tlsv1.2 -sSf -L "https://noto-website.storage.googleapis.com/pkgs/NotoSansCJKjp-hinted.zip" -o /tmp/fonts/NotoSansCJKjp-hinted.zip && \
|
||||
unzip /tmp/fonts/NotoSansCJKjp-hinted.zip -d /tmp/fonts/ && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/ && \
|
||||
rm -f /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" /tmp/zabbix-${ZBX_VERSION}/ui/include/defines.inc.php && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf ${ZBX_SOURCES_DIR}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt ${ZBX_SOURCES_DIR}/ui/assets/fonts/ && \
|
||||
rm -f ${ZBX_SOURCES_DIR}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" ${ZBX_SOURCES_DIR}/ui/include/defines.inc.php && \
|
||||
rm -rf /tmp/fonts/ && \
|
||||
chmod o+r /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/* && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_server/zabbix_server && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2 && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
|
||||
chmod o+r ${ZBX_SOURCES_DIR}/ui/assets/fonts/* && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_server/zabbix_server && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_agentd.conf ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/conf/zabbix_agentd/ ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_agent2.conf ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_server/zabbix_server ${ZBX_OUTPUT_DIR}/server/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_server.conf ${ZBX_OUTPUT_DIR}/server/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_proxy.conf ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/bin/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/lib/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
make -s distclean
|
||||
|
@ -20,12 +20,29 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
org.opencontainers.image.vendor="Zabbix SIA" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_VERSION}-output \
|
||||
DB_TYPE=mysql
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
--mount=type=cache,target=/root/go/ \
|
||||
set -eux && \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
|
||||
cd /tmp/zabbix-${ZBX_VERSION} && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/database/${DB_TYPE}/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
|
||||
cd ${ZBX_SOURCES_DIR} && \
|
||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/go/pkg/version/version.go && \
|
||||
@ -47,7 +64,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
--with-ldap \
|
||||
--with-libcurl \
|
||||
--with-libxml2 \
|
||||
--with-mysql \
|
||||
--with-${DB_TYPE} \
|
||||
--with-net-snmp \
|
||||
--with-openipmi \
|
||||
--with-openssl \
|
||||
@ -57,26 +74,38 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
make -j"$(nproc)" -s dbschema && \
|
||||
make -j"$(nproc)" -s && \
|
||||
make -j"$(nproc)" -s gettext && \
|
||||
cat database/mysql/schema.sql > database/mysql/create.sql && \
|
||||
cat database/mysql/images.sql >> database/mysql/create.sql && \
|
||||
cat database/mysql/data.sql >> database/mysql/create.sql && \
|
||||
gzip -c database/mysql/create.sql > database/mysql/create_server.sql.gz && \
|
||||
rm -rf database/mysql/create.sql && \
|
||||
cat database/mysql/schema.sql > database/mysql/create.sql && \
|
||||
gzip -c database/mysql/create.sql > database/mysql/create_proxy.sql.gz && \
|
||||
rm -rf database/mysql/create.sql && \
|
||||
cat database/${DB_TYPE}/schema.sql > database/${DB_TYPE}/create.sql && \
|
||||
gzip -c database/${DB_TYPE}/create.sql > ${ZBX_OUTPUT_DIR}/proxy/database/${DB_TYPE}/create.sql.gz && \
|
||||
cat database/${DB_TYPE}/images.sql >> database/${DB_TYPE}/create.sql && \
|
||||
cat database/${DB_TYPE}/data.sql >> database/${DB_TYPE}/create.sql && \
|
||||
gzip -c database/${DB_TYPE}/create.sql > ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/create.sql.gz && \
|
||||
rm -rf database/${DB_TYPE}/create.sql && \
|
||||
mkdir /tmp/fonts/ && \
|
||||
curl --tlsv1.2 -sSf -L "https://noto-website.storage.googleapis.com/pkgs/NotoSansCJKjp-hinted.zip" -o /tmp/fonts/NotoSansCJKjp-hinted.zip && \
|
||||
unzip /tmp/fonts/NotoSansCJKjp-hinted.zip -d /tmp/fonts/ && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/ && \
|
||||
rm -f /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" /tmp/zabbix-${ZBX_VERSION}/ui/include/defines.inc.php && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf ${ZBX_SOURCES_DIR}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt ${ZBX_SOURCES_DIR}/ui/assets/fonts/ && \
|
||||
rm -f ${ZBX_SOURCES_DIR}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" ${ZBX_SOURCES_DIR}/ui/include/defines.inc.php && \
|
||||
rm -rf /tmp/fonts/ && \
|
||||
chmod o+r /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/* && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_server/zabbix_server && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2 && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
|
||||
chmod o+r ${ZBX_SOURCES_DIR}/ui/assets/fonts/* && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_server/zabbix_server && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_agentd.conf ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/conf/zabbix_agentd/ ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_agent2.conf ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_server/zabbix_server ${ZBX_OUTPUT_DIR}/server/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_server.conf ${ZBX_OUTPUT_DIR}/server/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_proxy.conf ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/bin/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/lib/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
make -s distclean
|
||||
|
@ -30,6 +30,9 @@ LABEL description="Zabbix build base for MySQL based images" \
|
||||
org.label-schema.vcs-ref="${VCS_REF}" \
|
||||
org.label-schema.vendor="Zabbix SIA"
|
||||
|
||||
ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_VERSION}-output \
|
||||
DB_TYPE=mysql
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
--mount=type=cache,target=/root/go/ \
|
||||
set -eux && \
|
||||
@ -47,8 +50,22 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
*) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \
|
||||
esac; \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
|
||||
cd /tmp/zabbix-${ZBX_VERSION} && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/database/${DB_TYPE}/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
|
||||
cd ${ZBX_SOURCES_DIR} && \
|
||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/go/pkg/version/version.go && \
|
||||
@ -69,7 +86,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
--with-ldap \
|
||||
--with-libcurl \
|
||||
--with-libxml2 \
|
||||
--with-mysql \
|
||||
--with-${DB_TYPE} \
|
||||
--with-net-snmp \
|
||||
--with-openipmi \
|
||||
--with-openssl \
|
||||
@ -80,26 +97,38 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
make -j"$(nproc)" -s dbschema && \
|
||||
make -j"$(nproc)" -s && \
|
||||
make -j"$(nproc)" -s gettext && \
|
||||
cat database/mysql/schema.sql > database/mysql/create.sql && \
|
||||
cat database/mysql/images.sql >> database/mysql/create.sql && \
|
||||
cat database/mysql/data.sql >> database/mysql/create.sql && \
|
||||
gzip -c database/mysql/create.sql > database/mysql/create_server.sql.gz && \
|
||||
rm -rf database/mysql/create.sql && \
|
||||
cat database/mysql/schema.sql > database/mysql/create.sql && \
|
||||
gzip -c database/mysql/create.sql > database/mysql/create_proxy.sql.gz && \
|
||||
rm -rf database/mysql/create.sql && \
|
||||
cat database/${DB_TYPE}/schema.sql > database/${DB_TYPE}/create.sql && \
|
||||
gzip -c database/${DB_TYPE}/create.sql > ${ZBX_OUTPUT_DIR}/proxy/database/${DB_TYPE}/create.sql.gz && \
|
||||
cat database/${DB_TYPE}/images.sql >> database/${DB_TYPE}/create.sql && \
|
||||
cat database/${DB_TYPE}/data.sql >> database/${DB_TYPE}/create.sql && \
|
||||
gzip -c database/${DB_TYPE}/create.sql > ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/create.sql.gz && \
|
||||
rm -rf database/${DB_TYPE}/create.sql && \
|
||||
mkdir /tmp/fonts/ && \
|
||||
curl --tlsv1.2 -sSf -L "https://noto-website.storage.googleapis.com/pkgs/NotoSansCJKjp-hinted.zip" -o /tmp/fonts/NotoSansCJKjp-hinted.zip && \
|
||||
unzip /tmp/fonts/NotoSansCJKjp-hinted.zip -d /tmp/fonts/ && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/ && \
|
||||
rm -f /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" /tmp/zabbix-${ZBX_VERSION}/ui/include/defines.inc.php && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf ${ZBX_SOURCES_DIR}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt ${ZBX_SOURCES_DIR}/ui/assets/fonts/ && \
|
||||
rm -f ${ZBX_SOURCES_DIR}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" ${ZBX_SOURCES_DIR}/ui/include/defines.inc.php && \
|
||||
rm -rf /tmp/fonts/ && \
|
||||
chmod o+r /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/* && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_server/zabbix_server && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2 && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
|
||||
chmod o+r ${ZBX_SOURCES_DIR}/ui/assets/fonts/* && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_server/zabbix_server && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_agentd.conf ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/conf/zabbix_agentd/ ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_agent2.conf ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_server/zabbix_server ${ZBX_OUTPUT_DIR}/server/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_server.conf ${ZBX_OUTPUT_DIR}/server/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_proxy.conf ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/bin/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/lib/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
make -s distclean
|
||||
|
@ -20,6 +20,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
org.opencontainers.image.vendor="Zabbix SIA" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_VERSION}-output \
|
||||
DB_TYPE=mysql
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
--mount=type=cache,target=/root/go/ \
|
||||
set -eux && \
|
||||
@ -43,8 +46,22 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
*) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \
|
||||
esac; \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
|
||||
cd /tmp/zabbix-${ZBX_VERSION} && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/database/${DB_TYPE}/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
|
||||
cd ${ZBX_SOURCES_DIR} && \
|
||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/go/pkg/version/version.go && \
|
||||
@ -65,7 +82,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
--with-ldap \
|
||||
--with-libcurl \
|
||||
--with-libxml2 \
|
||||
--with-mysql \
|
||||
--with-${DB_TYPE} \
|
||||
--with-net-snmp \
|
||||
--with-openipmi \
|
||||
--with-openssl \
|
||||
@ -76,26 +93,38 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
make -j"$(nproc)" -s dbschema && \
|
||||
make -j"$(nproc)" -s && \
|
||||
make -j"$(nproc)" -s gettext && \
|
||||
cat database/mysql/schema.sql > database/mysql/create.sql && \
|
||||
cat database/mysql/images.sql >> database/mysql/create.sql && \
|
||||
cat database/mysql/data.sql >> database/mysql/create.sql && \
|
||||
gzip -c database/mysql/create.sql > database/mysql/create_server.sql.gz && \
|
||||
rm -rf database/mysql/create.sql && \
|
||||
cat database/mysql/schema.sql > database/mysql/create.sql && \
|
||||
gzip -c database/mysql/create.sql > database/mysql/create_proxy.sql.gz && \
|
||||
rm -rf database/mysql/create.sql && \
|
||||
cat database/${DB_TYPE}/schema.sql > database/${DB_TYPE}/create.sql && \
|
||||
gzip -c database/${DB_TYPE}/create.sql > ${ZBX_OUTPUT_DIR}/proxy/database/${DB_TYPE}/create.sql.gz && \
|
||||
cat database/${DB_TYPE}/images.sql >> database/${DB_TYPE}/create.sql && \
|
||||
cat database/${DB_TYPE}/data.sql >> database/${DB_TYPE}/create.sql && \
|
||||
gzip -c database/${DB_TYPE}/create.sql > ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/create.sql.gz && \
|
||||
rm -rf database/${DB_TYPE}/create.sql && \
|
||||
mkdir /tmp/fonts/ && \
|
||||
curl --tlsv1.2 -sSf -L "https://noto-website.storage.googleapis.com/pkgs/NotoSansCJKjp-hinted.zip" -o /tmp/fonts/NotoSansCJKjp-hinted.zip && \
|
||||
unzip /tmp/fonts/NotoSansCJKjp-hinted.zip -d /tmp/fonts/ && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/ && \
|
||||
rm -f /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" /tmp/zabbix-${ZBX_VERSION}/ui/include/defines.inc.php && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf ${ZBX_SOURCES_DIR}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt ${ZBX_SOURCES_DIR}/ui/assets/fonts/ && \
|
||||
rm -f ${ZBX_SOURCES_DIR}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" ${ZBX_SOURCES_DIR}/ui/include/defines.inc.php && \
|
||||
rm -rf /tmp/fonts/ && \
|
||||
chmod o+r /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/* && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_server/zabbix_server && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2 && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
|
||||
chmod o+r ${ZBX_SOURCES_DIR}/ui/assets/fonts/* && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_server/zabbix_server && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_agentd.conf ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/conf/zabbix_agentd/ ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_agent2.conf ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_server/zabbix_server ${ZBX_OUTPUT_DIR}/server/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_server.conf ${ZBX_OUTPUT_DIR}/server/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_proxy.conf ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/bin/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/lib/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
make -s distclean
|
||||
|
@ -15,7 +15,8 @@ ARG GIT_BRANCH
|
||||
ARG ZABBIX_VERSION_RC_NUM=2400
|
||||
|
||||
ENV ZBX_SOURCES=$ZBX_SOURCES MAJOR_VERSION=$MAJOR_VERSION ZBX_VERSION=$ZBX_VERSION GIT_BRANCH=${GIT_BRANCH:-$ZBX_VERSION} `
|
||||
ZABBIX_VERSION_RC_NUM=$ZABBIX_VERSION_RC_NUM
|
||||
ZABBIX_VERSION_RC_NUM=$ZABBIX_VERSION_RC_NUM `
|
||||
ZBX_SOURCES_DIR=C:\\zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=C:\\zabbix-${ZBX_VERSION}-output
|
||||
|
||||
LABEL org.opencontainers.image.title="Zabbix agent build (Windows)" `
|
||||
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" `
|
||||
@ -32,22 +33,22 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref
|
||||
RUN Set-Location -Path $env:SystemDrive\.; `
|
||||
`
|
||||
New-Item -ItemType directory -Path $env:SystemDrive\zabbix_src | Out-Null; `
|
||||
New-Item -ItemType directory -Path $env:SystemDrive\zabbix_output | Out-Null; `
|
||||
New-Item -ItemType directory -Path $env:SystemDrive\zabbix_output\sbin | Out-Null; `
|
||||
New-Item -ItemType directory -Path $env:SystemDrive\zabbix_output\bin | Out-Null; `
|
||||
New-Item -ItemType directory -Path $env:SystemDrive\zabbix_output\conf | Out-Null; `
|
||||
New-Item -ItemType directory -Path $env:ZBX_OUTPUT_DIR | Out-Null; `
|
||||
New-Item -ItemType directory -Path $env:ZBX_OUTPUT_DIR\sbin | Out-Null; `
|
||||
New-Item -ItemType directory -Path $env:ZBX_OUTPUT_DIRt\bin | Out-Null; `
|
||||
New-Item -ItemType directory -Path $env:ZBX_OUTPUT_DIR\conf | Out-Null; `
|
||||
`
|
||||
Import-Module (Get-ChildItem $env:VS_PATH -Recurse -File -Filter Microsoft.VisualStudio.DevShell.dll).FullName; `
|
||||
Enter-VsDevShell -VsInstallPath $env:VS_PATH -SkipAutomaticLocation -DevCmdArguments """-arch=$env:BUILD_ARCH"""; `
|
||||
`
|
||||
Write-Host ('Checkout GIT {0} ({1}) repository ...' -f $env:ZBX_SOURCES, $env:GIT_BRANCH); `
|
||||
git -c advice.detachedHead=false clone $env:ZBX_SOURCES --branch $env:GIT_BRANCH --depth 1 --single-branch $env:SystemDrive\zabbix_src\zabbix-$env:ZBX_VERSION; `
|
||||
git -c advice.detachedHead=false clone $env:ZBX_SOURCES --branch $env:GIT_BRANCH --depth 1 --single-branch $env:ZBX_SOURCES_DIR; `
|
||||
`
|
||||
Write-Host ('Building Zabbix {0} version ...' -f $env:ZBX_VERSION); `
|
||||
Set-Location -Path $env:SystemDrive\zabbix_src\zabbix-$env:ZBX_VERSION; `
|
||||
Set-Location -Path $env:ZBX_SOURCES_DIR; `
|
||||
$ZbxRevision=(git rev-parse --short HEAD); `
|
||||
(Get-Content include/version.h).replace('{ZABBIX_REVISION}', $ZbxRevision) | Set-Content include/version.h; `
|
||||
Set-Location -Path $env:SystemDrive\zabbix_src\zabbix-$env:ZBX_VERSION\build\win32\project; `
|
||||
Set-Location -Path $env:ZBX_SOURCES_DIR\build\win32\project; `
|
||||
set CL=/MP; `
|
||||
nmake /S -f Makefile `
|
||||
CPU=$env:CPU_MODEL `
|
||||
@ -61,11 +62,11 @@ RUN Set-Location -Path $env:SystemDrive\.; `
|
||||
all; `
|
||||
`
|
||||
Write-Host 'Verifying build ("zabbix_agentd.exe -V") ...'; `
|
||||
& $env:SystemDrive\zabbix_src\zabbix-$env:ZBX_VERSION\bin\win64\zabbix_agentd.exe -V; `
|
||||
dumpbin /dependents $env:SystemDrive\zabbix_src\zabbix-$env:ZBX_VERSION\bin\win64\zabbix_agentd.exe; `
|
||||
& $env:ZBX_SOURCES_DIR\bin\win64\zabbix_agentd.exe -V; `
|
||||
dumpbin /dependents $env:ZBX_SOURCES_DIR\bin\win64\zabbix_agentd.exe; `
|
||||
`
|
||||
Copy-Item -Path $env:SystemDrive\zabbix_src\zabbix-$env:ZBX_VERSION\bin\win64\zabbix_agentd.exe $env:SystemDrive\zabbix_output\sbin; `
|
||||
Copy-Item -Path $env:SystemDrive\zabbix_src\zabbix-$env:ZBX_VERSION\bin\win64\zabbix_get.exe $env:SystemDrive\zabbix_output\bin; `
|
||||
Copy-Item -Path $env:SystemDrive\zabbix_src\zabbix-$env:ZBX_VERSION\bin\win64\zabbix_sender.exe $env:SystemDrive\zabbix_output\bin; `
|
||||
Copy-Item -Path $env:SystemDrive\zabbix_src\zabbix-$env:ZBX_VERSION\conf\zabbix_agentd.win.conf $env:SystemDrive\zabbix_output\conf\zabbix_agentd.conf; `
|
||||
Copy-Item -Path $env:ZBX_SOURCES_DIR\bin\win64\zabbix_agentd.exe $env:ZBX_OUTPUT_DIR\sbin; `
|
||||
Copy-Item -Path $env:ZBX_SOURCES_DIR\bin\win64\zabbix_get.exe $env:ZBX_OUTPUT_DIR\bin; `
|
||||
Copy-Item -Path $env:ZBX_SOURCES_DIR\bin\win64\zabbix_sender.exe $env:ZBX_OUTPUT_DIR\bin; `
|
||||
Copy-Item -Path $env:ZBX_SOURCES_DIR\conf\zabbix_agentd.win.conf $env:ZBX_OUTPUT_DIR\conf\zabbix_agentd.conf; `
|
||||
Write-Host 'Zabbix binaries are compiled...';
|
||||
|
@ -12,9 +12,11 @@ ARG MAJOR_VERSION=5.0
|
||||
ARG ZBX_VERSION=${MAJOR_VERSION}.42
|
||||
ARG ZABBIX_VERSION_RC_NUM=2400
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
ARG GIT_BRANCH
|
||||
|
||||
ENV ZBX_SOURCES=$ZBX_SOURCES MAJOR_VERSION=$MAJOR_VERSION ZBX_VERSION=$ZBX_VERSION GIT_BRANCH=${GIT_BRANCH:-$ZBX_VERSION} `
|
||||
ZABBIX_VERSION_RC_NUM=$ZABBIX_VERSION_RC_NUM
|
||||
ZABBIX_VERSION_RC_NUM=$ZABBIX_VERSION_RC_NUM `
|
||||
ZBX_SOURCES_DIR=C:\\zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=C:\\zabbix-${ZBX_VERSION}-output
|
||||
|
||||
LABEL org.opencontainers.image.title="Zabbix agent 2 build (Windows)" `
|
||||
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" `
|
||||
@ -28,36 +30,36 @@ LABEL org.opencontainers.image.title="Zabbix agent 2 build (Windows)" `
|
||||
|
||||
RUN Set-Location -Path $env:SystemDrive\.; `
|
||||
`
|
||||
New-Item -ItemType directory -Path $env:SystemDrive\zabbix_src | Out-Null; `
|
||||
New-Item -ItemType directory -Path $env:SystemDrive\zabbix_output | Out-Null; `
|
||||
New-Item -ItemType directory -Path $env:SystemDrive\zabbix_output\sbin | Out-Null; `
|
||||
New-Item -ItemType directory -Path $env:SystemDrive\zabbix_output\conf | Out-Null; `
|
||||
New-Item -ItemType directory -Path $env:SystemDrive\zabbix_output\conf\zabbix_agentd.d | Out-Null; `
|
||||
New-Item -ItemType directory -Path $env:SystemDrive\zabbix_output\zabbix-agent2-plugin | Out-Null; `
|
||||
New-Item -ItemType directory -Path $env:ZBX_SOURCES_DIR | Out-Null; `
|
||||
New-Item -ItemType directory -Path $env:ZBX_OUTPUT_DIR | Out-Null; `
|
||||
New-Item -ItemType directory -Path $env:ZBX_OUTPUT_DIR\sbin | Out-Null; `
|
||||
New-Item -ItemType directory -Path $env:ZBX_OUTPUT_DIR\conf | Out-Null; `
|
||||
New-Item -ItemType directory -Path $env:ZBX_OUTPUT_DIR\conf\zabbix_agentd.d | Out-Null; `
|
||||
New-Item -ItemType directory -Path $env:ZBX_OUTPUT_DIR\zabbix-agent2-plugin | Out-Null; `
|
||||
`
|
||||
Import-Module (Get-ChildItem $env:VS_PATH -Recurse -File -Filter Microsoft.VisualStudio.DevShell.dll).FullName; `
|
||||
Enter-VsDevShell -VsInstallPath $env:VS_PATH -SkipAutomaticLocation -DevCmdArguments """-arch=$env:BUILD_ARCH"""; `
|
||||
`
|
||||
Write-Host ('Checkout GIT {0} ({1}) repository ...' -f $env:ZBX_SOURCES, $env:GIT_BRANCH); `
|
||||
git -c advice.detachedHead=false clone $env:ZBX_SOURCES --branch $env:GIT_BRANCH --depth 1 --single-branch $env:SystemDrive\zabbix_src\zabbix-$env:ZBX_VERSION; `
|
||||
git -c advice.detachedHead=false clone $env:ZBX_SOURCES --branch $env:GIT_BRANCH --depth 1 --single-branch $env:ZBX_SOURCES_DIR; `
|
||||
`
|
||||
Write-Host ('Building Zabbix {0} version ...' -f $env:ZBX_VERSION); `
|
||||
Set-Location -Path $env:SystemDrive\zabbix_src\zabbix-$env:ZBX_VERSION; `
|
||||
Set-Location -Path $env:ZBX_SOURCES_DIR; `
|
||||
$ZbxRevision=(git rev-parse --short HEAD); `
|
||||
(Get-Content include\version.h).replace('{ZABBIX_REVISION}', $ZbxRevision) | Set-Content include\version.h; `
|
||||
(Get-Content src\go\pkg\version\version.go).replace('{ZABBIX_REVISION}', $ZbxRevision) | Set-Content src\go\pkg\version\version.go; `
|
||||
Set-Location -Path $env:SystemDrive\zabbix_src\zabbix-$env:ZBX_VERSION\build\mingw; `
|
||||
Set-Location -Path $env:ZBX_SOURCES_DIR\build\mingw; `
|
||||
mingw32-make -j"""$env:NUMBER_OF_PROCESSORS""" `
|
||||
PCRE=$env:BUILD_OUTPUT\pcre `
|
||||
OPENSSL=$env:BUILD_OUTPUT\openssl `
|
||||
RFLAGS="""-DZABBIX_VERSION_RC_NUM=$env:ZABBIX_VERSION_RC_NUM"""; `
|
||||
`
|
||||
Write-Host 'Verifying build ("zabbix_agent2.exe -V") ...'; `
|
||||
& $env:SystemDrive\zabbix_src\zabbix-$env:ZBX_VERSION\bin\win64\zabbix_agent2.exe -V; `
|
||||
dumpbin /dependents $env:SystemDrive\zabbix_src\zabbix-$env:ZBX_VERSION\bin\win64\zabbix_agent2.exe; `
|
||||
& $env:ZBX_SOURCES_DIR\bin\win64\zabbix_agent2.exe -V; `
|
||||
dumpbin /dependents $env:ZBX_SOURCES_DIR\bin\win64\zabbix_agent2.exe; `
|
||||
`
|
||||
Copy-Item -Path $env:SystemDrive\zabbix_src\zabbix-$env:ZBX_VERSION\bin\win64\zabbix_agent2.exe $env:SystemDrive\zabbix_output\sbin; `
|
||||
Copy-Item -Path $env:SystemDrive\zabbix_src\zabbix-$env:ZBX_VERSION\src\go\conf\zabbix_agent2.win.conf $env:SystemDrive\zabbix_output\conf\zabbix_agent2.conf; `
|
||||
Copy-Item -Path $env:ZBX_SOURCES_DIR\bin\win64\zabbix_agent2.exe $env:ZBX_OUTPUT_DIR\sbin; `
|
||||
Copy-Item -Path $env:ZBX_SOURCES_DIR\src\go\conf\zabbix_agent2.win.conf $env:ZBX_OUTPUT_DIR\conf\zabbix_agent2.conf; `
|
||||
mingw32-make -s clean; `
|
||||
`
|
||||
Write-Host 'Zabbix binaries are compiled...';
|
||||
|
@ -20,6 +20,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
org.opencontainers.image.vendor="Zabbix SIA" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_VERSION}-output \
|
||||
DB_TYPE=postgresql
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
--mount=type=cache,target=/root/go/ \
|
||||
set -eux && \
|
||||
@ -43,8 +46,22 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
*) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \
|
||||
esac; \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
|
||||
cd /tmp/zabbix-${ZBX_VERSION} && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/database/${DB_TYPE}/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
|
||||
cd ${ZBX_SOURCES_DIR} && \
|
||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/go/pkg/version/version.go && \
|
||||
@ -68,7 +85,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
--with-net-snmp \
|
||||
--with-openipmi \
|
||||
--with-openssl \
|
||||
--with-postgresql \
|
||||
--with-${DB_TYPE} \
|
||||
--with-ssh \
|
||||
--with-unixodbc \
|
||||
$additional_components \
|
||||
@ -76,26 +93,39 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
make -j"$(nproc)" -s dbschema && \
|
||||
make -j"$(nproc)" -s && \
|
||||
make -j"$(nproc)" -s gettext && \
|
||||
cat database/postgresql/schema.sql > database/postgresql/create.sql && \
|
||||
cat database/postgresql/images.sql >> database/postgresql/create.sql && \
|
||||
cat database/postgresql/data.sql >> database/postgresql/create.sql && \
|
||||
gzip -c database/postgresql/create.sql > database/postgresql/create_server.sql.gz && \
|
||||
rm -rf database/postgresql/create.sql && \
|
||||
cat database/postgresql/schema.sql > database/postgresql/create.sql && \
|
||||
gzip -c database/postgresql/create.sql > database/postgresql/create_proxy.sql.gz && \
|
||||
rm -rf database/postgresql/create.sql && \
|
||||
cat database/${DB_TYPE}/schema.sql > database/${DB_TYPE}/create.sql && \
|
||||
gzip -c database/${DB_TYPE}/create.sql > ${ZBX_OUTPUT_DIR}/proxy/database/${DB_TYPE}/create.sql.gz && \
|
||||
cat database/${DB_TYPE}/images.sql >> database/${DB_TYPE}/create.sql && \
|
||||
cat database/${DB_TYPE}/data.sql >> database/${DB_TYPE}/create.sql && \
|
||||
gzip -c database/${DB_TYPE}/create.sql > ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/create.sql.gz && \
|
||||
rm -rf database/${DB_TYPE}/create.sql && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/database/postgresql/timescaledb.sql ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/timescaledb.sql && \
|
||||
mkdir /tmp/fonts/ && \
|
||||
curl --tlsv1.2 -sSf -L "https://noto-website.storage.googleapis.com/pkgs/NotoSansCJKjp-hinted.zip" -o /tmp/fonts/NotoSansCJKjp-hinted.zip && \
|
||||
unzip /tmp/fonts/NotoSansCJKjp-hinted.zip -d /tmp/fonts/ && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/ && \
|
||||
rm -f /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" /tmp/zabbix-${ZBX_VERSION}/ui/include/defines.inc.php && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf ${ZBX_SOURCES_DIR}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt ${ZBX_SOURCES_DIR}/ui/assets/fonts/ && \
|
||||
rm -f ${ZBX_SOURCES_DIR}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" ${ZBX_SOURCES_DIR}/ui/include/defines.inc.php && \
|
||||
rm -rf /tmp/fonts/ && \
|
||||
chmod o+r /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/* && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_server/zabbix_server && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2 && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
|
||||
chmod o+r ${ZBX_SOURCES_DIR}/ui/assets/fonts/* && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_server/zabbix_server && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_agentd.conf ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/conf/zabbix_agentd/ ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_agent2.conf ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_server/zabbix_server ${ZBX_OUTPUT_DIR}/server/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_server.conf ${ZBX_OUTPUT_DIR}/server/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_proxy.conf ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/bin/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/lib/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
make -s distclean
|
||||
|
@ -20,6 +20,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
org.opencontainers.image.vendor="Zabbix SIA" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_VERSION}-output \
|
||||
DB_TYPE=postgresql
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
--mount=type=cache,target=/root/go/ \
|
||||
set -eux && \
|
||||
@ -37,8 +40,22 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
*) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \
|
||||
esac; \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
|
||||
cd /tmp/zabbix-${ZBX_VERSION} && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/database/${DB_TYPE}/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
|
||||
cd ${ZBX_SOURCES_DIR} && \
|
||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/go/pkg/version/version.go && \
|
||||
@ -62,7 +79,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
--with-net-snmp \
|
||||
--with-openipmi \
|
||||
--with-openssl \
|
||||
--with-postgresql \
|
||||
--with-${DB_TYPE} \
|
||||
--with-ssh \
|
||||
--with-unixodbc \
|
||||
$additional_components \
|
||||
@ -70,26 +87,39 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
make -j"$(nproc)" -s dbschema && \
|
||||
make -j"$(nproc)" -s && \
|
||||
make -j"$(nproc)" -s gettext && \
|
||||
cat database/postgresql/schema.sql > database/postgresql/create.sql && \
|
||||
cat database/postgresql/images.sql >> database/postgresql/create.sql && \
|
||||
cat database/postgresql/data.sql >> database/postgresql/create.sql && \
|
||||
gzip -c database/postgresql/create.sql > database/postgresql/create_server.sql.gz && \
|
||||
rm -rf database/postgresql/create.sql && \
|
||||
cat database/postgresql/schema.sql > database/postgresql/create.sql && \
|
||||
gzip -c database/postgresql/create.sql > database/postgresql/create_proxy.sql.gz && \
|
||||
rm -rf database/postgresql/create.sql && \
|
||||
cat database/${DB_TYPE}/schema.sql > database/${DB_TYPE}/create.sql && \
|
||||
gzip -c database/${DB_TYPE}/create.sql > ${ZBX_OUTPUT_DIR}/proxy/database/${DB_TYPE}/create.sql.gz && \
|
||||
cat database/${DB_TYPE}/images.sql >> database/${DB_TYPE}/create.sql && \
|
||||
cat database/${DB_TYPE}/data.sql >> database/${DB_TYPE}/create.sql && \
|
||||
gzip -c database/${DB_TYPE}/create.sql > ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/create.sql.gz && \
|
||||
rm -rf database/${DB_TYPE}/create.sql && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/database/postgresql/timescaledb.sql ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/timescaledb.sql && \
|
||||
mkdir /tmp/fonts/ && \
|
||||
curl --tlsv1.2 -sSf -L "https://noto-website.storage.googleapis.com/pkgs/NotoSansCJKjp-hinted.zip" -o /tmp/fonts/NotoSansCJKjp-hinted.zip && \
|
||||
unzip /tmp/fonts/NotoSansCJKjp-hinted.zip -d /tmp/fonts/ && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/ && \
|
||||
rm -f /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" /tmp/zabbix-${ZBX_VERSION}/ui/include/defines.inc.php && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf ${ZBX_SOURCES_DIR}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt ${ZBX_SOURCES_DIR}/ui/assets/fonts/ && \
|
||||
rm -f ${ZBX_SOURCES_DIR}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" ${ZBX_SOURCES_DIR}/ui/include/defines.inc.php && \
|
||||
rm -rf /tmp/fonts/ && \
|
||||
chmod o+r /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/* && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_server/zabbix_server && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2 && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
|
||||
chmod o+r ${ZBX_SOURCES_DIR}/ui/assets/fonts/* && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_server/zabbix_server && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_agentd.conf ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/conf/zabbix_agentd/ ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_agent2.conf ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_server/zabbix_server ${ZBX_OUTPUT_DIR}/server/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_server.conf ${ZBX_OUTPUT_DIR}/server/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_proxy.conf ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/bin/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/lib/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
make -s distclean
|
||||
|
@ -20,12 +20,29 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
org.opencontainers.image.vendor="Zabbix SIA" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_VERSION}-output \
|
||||
DB_TYPE=postgresql
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
--mount=type=cache,target=/root/go/ \
|
||||
set -eux && \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
|
||||
cd /tmp/zabbix-${ZBX_VERSION} && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/database/${DB_TYPE}/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
|
||||
cd ${ZBX_SOURCES_DIR} && \
|
||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/go/pkg/version/version.go && \
|
||||
@ -50,33 +67,46 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
--with-net-snmp \
|
||||
--with-openipmi \
|
||||
--with-openssl \
|
||||
--with-postgresql \
|
||||
--with-${DB_TYPE} \
|
||||
--with-ssh \
|
||||
--with-unixodbc \
|
||||
--silent && \
|
||||
make -j"$(nproc)" -s dbschema && \
|
||||
make -j"$(nproc)" -s && \
|
||||
make -j"$(nproc)" -s gettext && \
|
||||
cat database/postgresql/schema.sql > database/postgresql/create.sql && \
|
||||
cat database/postgresql/images.sql >> database/postgresql/create.sql && \
|
||||
cat database/postgresql/data.sql >> database/postgresql/create.sql && \
|
||||
gzip -c database/postgresql/create.sql > database/postgresql/create_server.sql.gz && \
|
||||
rm -rf database/postgresql/create.sql && \
|
||||
cat database/postgresql/schema.sql > database/postgresql/create.sql && \
|
||||
gzip -c database/postgresql/create.sql > database/postgresql/create_proxy.sql.gz && \
|
||||
rm -rf database/postgresql/create.sql && \
|
||||
cat database/${DB_TYPE}/schema.sql > database/${DB_TYPE}/create.sql && \
|
||||
gzip -c database/${DB_TYPE}/create.sql > ${ZBX_OUTPUT_DIR}/proxy/database/${DB_TYPE}/create.sql.gz && \
|
||||
cat database/${DB_TYPE}/images.sql >> database/${DB_TYPE}/create.sql && \
|
||||
cat database/${DB_TYPE}/data.sql >> database/${DB_TYPE}/create.sql && \
|
||||
gzip -c database/${DB_TYPE}/create.sql > ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/create.sql.gz && \
|
||||
rm -rf database/${DB_TYPE}/create.sql && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/database/postgresql/timescaledb.sql ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/timescaledb.sql && \
|
||||
mkdir /tmp/fonts/ && \
|
||||
curl --tlsv1.2 -sSf -L "https://noto-website.storage.googleapis.com/pkgs/NotoSansCJKjp-hinted.zip" -o /tmp/fonts/NotoSansCJKjp-hinted.zip && \
|
||||
unzip /tmp/fonts/NotoSansCJKjp-hinted.zip -d /tmp/fonts/ && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/ && \
|
||||
rm -f /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" /tmp/zabbix-${ZBX_VERSION}/ui/include/defines.inc.php && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf ${ZBX_SOURCES_DIR}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt ${ZBX_SOURCES_DIR}/ui/assets/fonts/ && \
|
||||
rm -f ${ZBX_SOURCES_DIR}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" ${ZBX_SOURCES_DIR}/ui/include/defines.inc.php && \
|
||||
rm -rf /tmp/fonts/ && \
|
||||
chmod o+r /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/* && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_server/zabbix_server && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2 && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
|
||||
chmod o+r ${ZBX_SOURCES_DIR}/ui/assets/fonts/* && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_server/zabbix_server && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_agentd.conf ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/conf/zabbix_agentd/ ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_agent2.conf ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_server/zabbix_server ${ZBX_OUTPUT_DIR}/server/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_server.conf ${ZBX_OUTPUT_DIR}/server/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_proxy.conf ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/bin/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/lib/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
make -s distclean
|
||||
|
@ -20,6 +20,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
org.opencontainers.image.vendor="Zabbix SIA" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_VERSION}-output \
|
||||
DB_TYPE=postgresql
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
--mount=type=cache,target=/root/go/ \
|
||||
set -eux && \
|
||||
@ -43,8 +46,23 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
*) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \
|
||||
esac; \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
|
||||
cd /tmp/zabbix-${ZBX_VERSION} && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/database/${DB_TYPE}/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
|
||||
cd ${ZBX_SOURCES_DIR} && \
|
||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/go/pkg/version/version.go && \
|
||||
@ -68,7 +86,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
--with-net-snmp \
|
||||
--with-openipmi \
|
||||
--with-openssl \
|
||||
--with-postgresql \
|
||||
--with-${DB_TYPE} \
|
||||
--with-ssh \
|
||||
--with-unixodbc \
|
||||
$additional_components \
|
||||
@ -76,26 +94,40 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
make -j"$(nproc)" -s dbschema && \
|
||||
make -j"$(nproc)" -s && \
|
||||
make -j"$(nproc)" -s gettext && \
|
||||
cat database/postgresql/schema.sql > database/postgresql/create.sql && \
|
||||
cat database/postgresql/images.sql >> database/postgresql/create.sql && \
|
||||
cat database/postgresql/data.sql >> database/postgresql/create.sql && \
|
||||
gzip -c database/postgresql/create.sql > database/postgresql/create_server.sql.gz && \
|
||||
rm -rf database/postgresql/create.sql && \
|
||||
cat database/postgresql/schema.sql > database/postgresql/create.sql && \
|
||||
gzip -c database/postgresql/create.sql > database/postgresql/create_proxy.sql.gz && \
|
||||
rm -rf database/postgresql/create.sql && \
|
||||
cat database/${DB_TYPE}/schema.sql > database/${DB_TYPE}/create.sql && \
|
||||
gzip -c database/${DB_TYPE}/create.sql > ${ZBX_OUTPUT_DIR}/proxy/database/${DB_TYPE}/create.sql.gz && \
|
||||
cat database/${DB_TYPE}/images.sql >> database/${DB_TYPE}/create.sql && \
|
||||
cat database/${DB_TYPE}/data.sql >> database/${DB_TYPE}/create.sql && \
|
||||
gzip -c database/${DB_TYPE}/create.sql > ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/create.sql.gz && \
|
||||
rm -rf database/${DB_TYPE}/create.sql && \
|
||||
ls -lah ${ZBX_SOURCES_DIR}/database/postgresql && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/database/postgresql/timescaledb.sql ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/timescaledb.sql && \
|
||||
mkdir /tmp/fonts/ && \
|
||||
curl --tlsv1.2 -sSf -L "https://noto-website.storage.googleapis.com/pkgs/NotoSansCJKjp-hinted.zip" -o /tmp/fonts/NotoSansCJKjp-hinted.zip && \
|
||||
unzip /tmp/fonts/NotoSansCJKjp-hinted.zip -d /tmp/fonts/ && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/ && \
|
||||
rm -f /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" /tmp/zabbix-${ZBX_VERSION}/ui/include/defines.inc.php && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf ${ZBX_SOURCES_DIR}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt ${ZBX_SOURCES_DIR}/ui/assets/fonts/ && \
|
||||
rm -f ${ZBX_SOURCES_DIR}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" ${ZBX_SOURCES_DIR}/ui/include/defines.inc.php && \
|
||||
rm -rf /tmp/fonts/ && \
|
||||
chmod o+r /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/* && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_server/zabbix_server && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2 && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
|
||||
chmod o+r ${ZBX_SOURCES_DIR}/ui/assets/fonts/* && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_server/zabbix_server && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_agentd.conf ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/conf/zabbix_agentd/ ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_agent2.conf ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_server/zabbix_server ${ZBX_OUTPUT_DIR}/server/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_server.conf ${ZBX_OUTPUT_DIR}/server/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_proxy.conf ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/bin/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/lib/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
make -s distclean
|
||||
|
@ -20,6 +20,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
org.opencontainers.image.vendor="Zabbix SIA" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_VERSION}-output \
|
||||
DB_TYPE=sqlite3
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
--mount=type=cache,target=/root/go/ \
|
||||
set -eux && \
|
||||
@ -43,8 +46,18 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
*) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \
|
||||
esac; \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
|
||||
cd /tmp/zabbix-${ZBX_VERSION} && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
|
||||
cd ${ZBX_SOURCES_DIR} && \
|
||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/go/pkg/version/version.go && \
|
||||
@ -77,14 +90,26 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
mkdir /tmp/fonts/ && \
|
||||
curl --tlsv1.2 -sSf -L "https://noto-website.storage.googleapis.com/pkgs/NotoSansCJKjp-hinted.zip" -o /tmp/fonts/NotoSansCJKjp-hinted.zip && \
|
||||
unzip /tmp/fonts/NotoSansCJKjp-hinted.zip -d /tmp/fonts/ && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/ && \
|
||||
rm -f /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" /tmp/zabbix-${ZBX_VERSION}/ui/include/defines.inc.php && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf ${ZBX_SOURCES_DIR}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt ${ZBX_SOURCES_DIR}/ui/assets/fonts/ && \
|
||||
rm -f ${ZBX_SOURCES_DIR}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" ${ZBX_SOURCES_DIR}/ui/include/defines.inc.php && \
|
||||
rm -rf /tmp/fonts/ && \
|
||||
chmod o+r /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/* && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2 && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
|
||||
chmod o+r ${ZBX_SOURCES_DIR}/ui/assets/fonts/* && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_agentd.conf ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/conf/zabbix_agentd/ ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_agent2.conf ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_proxy.conf ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/bin/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/lib/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
make -s distclean
|
||||
|
@ -20,6 +20,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
org.opencontainers.image.vendor="Zabbix SIA" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_VERSION}-output \
|
||||
DB_TYPE=sqlite3
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
--mount=type=cache,target=/root/go/ \
|
||||
set -eux && \
|
||||
@ -37,8 +40,18 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
*) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \
|
||||
esac; \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
|
||||
cd /tmp/zabbix-${ZBX_VERSION} && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
|
||||
cd ${ZBX_SOURCES_DIR} && \
|
||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/go/pkg/version/version.go && \
|
||||
@ -71,14 +84,26 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
mkdir /tmp/fonts/ && \
|
||||
curl --tlsv1.2 -sSf -L "https://noto-website.storage.googleapis.com/pkgs/NotoSansCJKjp-hinted.zip" -o /tmp/fonts/NotoSansCJKjp-hinted.zip && \
|
||||
unzip /tmp/fonts/NotoSansCJKjp-hinted.zip -d /tmp/fonts/ && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/ && \
|
||||
rm -f /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" /tmp/zabbix-${ZBX_VERSION}/ui/include/defines.inc.php && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf ${ZBX_SOURCES_DIR}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt ${ZBX_SOURCES_DIR}/ui/assets/fonts/ && \
|
||||
rm -f ${ZBX_SOURCES_DIR}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" ${ZBX_SOURCES_DIR}/ui/include/defines.inc.php && \
|
||||
rm -rf /tmp/fonts/ && \
|
||||
chmod o+r /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/* && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2 && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
|
||||
chmod o+r ${ZBX_SOURCES_DIR}/ui/assets/fonts/* && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_agentd.conf ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/conf/zabbix_agentd/ ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_agent2.conf ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_proxy.conf ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/bin/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/lib/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
make -s distclean
|
||||
|
@ -20,12 +20,26 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
org.opencontainers.image.vendor="Zabbix SIA" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_VERSION}-output \
|
||||
DB_TYPE=sqlite3
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
--mount=type=cache,target=/root/go/ \
|
||||
set -eux && \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
|
||||
cd /tmp/zabbix-${ZBX_VERSION} && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
|
||||
cd ${ZBX_SOURCES_DIR} && \
|
||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/go/pkg/version/version.go && \
|
||||
@ -58,14 +72,26 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
mkdir /tmp/fonts/ && \
|
||||
curl --tlsv1.2 -sSf -L "https://noto-website.storage.googleapis.com/pkgs/NotoSansCJKjp-hinted.zip" -o /tmp/fonts/NotoSansCJKjp-hinted.zip && \
|
||||
unzip /tmp/fonts/NotoSansCJKjp-hinted.zip -d /tmp/fonts/ && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/ && \
|
||||
rm -f /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" /tmp/zabbix-${ZBX_VERSION}/ui/include/defines.inc.php && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf ${ZBX_SOURCES_DIR}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt ${ZBX_SOURCES_DIR}/ui/assets/fonts/ && \
|
||||
rm -f ${ZBX_SOURCES_DIR}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" ${ZBX_SOURCES_DIR}/ui/include/defines.inc.php && \
|
||||
rm -rf /tmp/fonts/ && \
|
||||
chmod o+r /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/* && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2 && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
|
||||
chmod o+r ${ZBX_SOURCES_DIR}/ui/assets/fonts/* && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_agentd.conf ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/conf/zabbix_agentd/ ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_agent2.conf ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_proxy.conf ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/bin/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/lib/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
make -s distclean
|
||||
|
@ -30,6 +30,9 @@ LABEL description="Zabbix build base for SQLite3 based images" \
|
||||
org.label-schema.vcs-ref="${VCS_REF}" \
|
||||
org.label-schema.vendor="Zabbix SIA"
|
||||
|
||||
ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_VERSION}-output \
|
||||
DB_TYPE=sqlite3
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
--mount=type=cache,target=/root/go/ \
|
||||
set -eux && \
|
||||
@ -47,8 +50,19 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
*) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \
|
||||
esac; \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
|
||||
cd /tmp/zabbix-${ZBX_VERSION} && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
|
||||
cd ${ZBX_SOURCES_DIR} && \
|
||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/go/pkg/version/version.go && \
|
||||
@ -81,14 +95,26 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
mkdir /tmp/fonts/ && \
|
||||
curl --tlsv1.2 -sSf -L "https://noto-website.storage.googleapis.com/pkgs/NotoSansCJKjp-hinted.zip" -o /tmp/fonts/NotoSansCJKjp-hinted.zip && \
|
||||
unzip /tmp/fonts/NotoSansCJKjp-hinted.zip -d /tmp/fonts/ && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/ && \
|
||||
rm -f /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" /tmp/zabbix-${ZBX_VERSION}/ui/include/defines.inc.php && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf ${ZBX_SOURCES_DIR}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt ${ZBX_SOURCES_DIR}/ui/assets/fonts/ && \
|
||||
rm -f ${ZBX_SOURCES_DIR}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" ${ZBX_SOURCES_DIR}/ui/include/defines.inc.php && \
|
||||
rm -rf /tmp/fonts/ && \
|
||||
chmod o+r /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/* && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2 && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
|
||||
chmod o+r ${ZBX_SOURCES_DIR}/ui/assets/fonts/* && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_agentd.conf ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/conf/zabbix_agentd/ ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_agent2.conf ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_proxy.conf ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/bin/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/lib/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
make -s distclean
|
||||
|
@ -20,6 +20,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
org.opencontainers.image.vendor="Zabbix SIA" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_VERSION}-output \
|
||||
DB_TYPE=sqlite3
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
--mount=type=cache,target=/root/go/ \
|
||||
set -eux && \
|
||||
@ -43,8 +46,18 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
*) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \
|
||||
esac; \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
|
||||
cd /tmp/zabbix-${ZBX_VERSION} && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
|
||||
cd ${ZBX_SOURCES_DIR} && \
|
||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/go/pkg/version/version.go && \
|
||||
@ -77,14 +90,26 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
mkdir /tmp/fonts/ && \
|
||||
curl --tlsv1.2 -sSf -L "https://noto-website.storage.googleapis.com/pkgs/NotoSansCJKjp-hinted.zip" -o /tmp/fonts/NotoSansCJKjp-hinted.zip && \
|
||||
unzip /tmp/fonts/NotoSansCJKjp-hinted.zip -d /tmp/fonts/ && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/ && \
|
||||
rm -f /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" /tmp/zabbix-${ZBX_VERSION}/ui/include/defines.inc.php && \
|
||||
cp /tmp/fonts/NotoSansCJKjp-Regular.otf ${ZBX_SOURCES_DIR}/ui/assets/fonts/NotoSansCJKjp-Regular.ttf && \
|
||||
cp /tmp/fonts/LICENSE_OFL.txt ${ZBX_SOURCES_DIR}/ui/assets/fonts/ && \
|
||||
rm -f ${ZBX_SOURCES_DIR}/ui/assets/fonts/DejaVuSans.ttf && \
|
||||
sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1NotoSansCJKjp-Regular/" ${ZBX_SOURCES_DIR}/ui/include/defines.inc.php && \
|
||||
rm -rf /tmp/fonts/ && \
|
||||
chmod o+r /tmp/zabbix-${ZBX_VERSION}/ui/assets/fonts/* && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2 && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
|
||||
chmod o+r ${ZBX_SOURCES_DIR}/ui/assets/fonts/* && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get && \
|
||||
strip ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_agent/zabbix_agentd ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_agentd.conf ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/conf/zabbix_agentd/ ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_agent2 ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_agent2.conf ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_proxy/zabbix_proxy ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/conf/zabbix_proxy.conf ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/bin/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp -R ${ZBX_SOURCES_DIR}/src/zabbix_java/lib/ ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_get/zabbix_get ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
cp ${ZBX_SOURCES_DIR}/src/zabbix_sender/zabbix_sender ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||
make -s distclean
|
||||
|
@ -27,8 +27,7 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/bin", "/usr/sbin/zabbix_java/bin"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/lib", "/usr/sbin/zabbix_java/lib"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/java_gateway/sbin/", "/usr/sbin/zabbix_java/"]
|
||||
|
||||
RUN set -eux && \
|
||||
INSTALL_PKGS="bash \
|
||||
@ -51,7 +50,6 @@ RUN set -eux && \
|
||||
--home /var/lib/zabbix/ \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix/ && \
|
||||
mkdir -p /usr/sbin/zabbix_java/ && \
|
||||
mkdir -p /usr/sbin/zabbix_java/ext_lib/ && \
|
||||
rm -rf /usr/sbin/zabbix_java/lib/logback.xml && \
|
||||
mv /usr/sbin/zabbix_java/lib/logback-console.xml /etc/zabbix/zabbix_java_gateway_logback.xml && \
|
||||
|
@ -26,8 +26,7 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/bin", "/usr/sbin/zabbix_java/bin"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/lib", "/usr/sbin/zabbix_java/lib"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/java_gateway/sbin/", "/usr/sbin/zabbix_java/"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
set -eux && \
|
||||
|
@ -26,8 +26,7 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/bin", "/usr/sbin/zabbix_java/bin"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/lib", "/usr/sbin/zabbix_java/lib"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/java_gateway/sbin/", "/usr/sbin/zabbix_java/"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
set -eux && \
|
||||
|
@ -44,9 +44,7 @@ LABEL description="Zabbix Java Gateway performs native support for monitoring JM
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY ["licenses", "/licenses"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/bin", "/usr/sbin/zabbix_java/bin"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/lib", "/usr/sbin/zabbix_java/lib"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/java_gateway/sbin/", "/usr/sbin/zabbix_java/"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
set -eux && \
|
||||
|
@ -26,8 +26,7 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/bin", "/usr/sbin/zabbix_java/bin"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/lib", "/usr/sbin/zabbix_java/lib"]
|
||||
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 \
|
||||
set -eux && \
|
||||
|
@ -28,11 +28,10 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy", "/usr/sbin/zabbix_proxy"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/zabbix/zabbix_proxy.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_proxy.sql.gz", "/usr/share/doc/zabbix-proxy-mysql/create.sql.gz"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/sbin/zabbix_proxy", "/usr/sbin/zabbix_proxy"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "/etc/zabbix/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/database/mysql/", "/usr/share/doc/zabbix-proxy-mysql/"]
|
||||
|
||||
RUN set -eux && \
|
||||
INSTALL_PKGS="bash \
|
||||
|
@ -28,11 +28,10 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy", "/usr/sbin/zabbix_proxy"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/zabbix/zabbix_proxy.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_proxy.sql.gz", "/usr/share/doc/zabbix-proxy-mysql/create.sql.gz"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/sbin/zabbix_proxy", "/usr/sbin/zabbix_proxy"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "/etc/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/ \
|
||||
set -eux && \
|
||||
|
@ -28,11 +28,10 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy", "/usr/sbin/zabbix_proxy"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/zabbix/zabbix_proxy.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_proxy.sql.gz", "/usr/share/doc/zabbix-proxy-mysql/create.sql.gz"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/sbin/zabbix_proxy", "/usr/sbin/zabbix_proxy"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "/etc/zabbix/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/database/mysql/", "/usr/share/doc/zabbix-proxy-mysql/"]
|
||||
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
|
@ -47,11 +47,10 @@ LABEL description="Zabbix proxy with MySQL database support" \
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY ["licenses", "/licenses"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy", "/usr/sbin/zabbix_proxy"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/zabbix/zabbix_proxy.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_proxy.sql.gz", "/usr/share/doc/zabbix-proxy-mysql/create.sql.gz"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/sbin/zabbix_proxy", "/usr/sbin/zabbix_proxy"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "/etc/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/ \
|
||||
set -eux && \
|
||||
|
@ -29,11 +29,10 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy", "/usr/sbin/zabbix_proxy"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/zabbix/zabbix_proxy.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_proxy.sql.gz", "/usr/share/doc/zabbix-proxy-mysql/create.sql.gz"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/sbin/zabbix_proxy", "/usr/sbin/zabbix_proxy"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "/etc/zabbix/"]
|
||||
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 \
|
||||
set -eux && \
|
||||
|
@ -28,10 +28,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy", "/usr/sbin/zabbix_proxy"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/zabbix/zabbix_proxy.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/sbin/zabbix_proxy", "/usr/sbin/zabbix_proxy"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "/etc/zabbix/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/", "/usr/bin/"]
|
||||
|
||||
RUN set -eux && \
|
||||
INSTALL_PKGS="bash \
|
||||
|
@ -28,10 +28,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy", "/usr/sbin/zabbix_proxy"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/zabbix/zabbix_proxy.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/sbin/zabbix_proxy", "/usr/sbin/zabbix_proxy"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "/etc/zabbix/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/", "/usr/bin/"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
set -eux && \
|
||||
|
@ -28,10 +28,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy", "/usr/sbin/zabbix_proxy"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/zabbix/zabbix_proxy.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/sbin/zabbix_proxy", "/usr/sbin/zabbix_proxy"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "/etc/zabbix/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/", "/usr/bin/"]
|
||||
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
|
@ -47,10 +47,9 @@ LABEL description="Zabbix proxy with SQLite3 database support" \
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY ["licenses", "/licenses"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy", "/usr/sbin/zabbix_proxy"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/zabbix/zabbix_proxy.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/sbin/zabbix_proxy", "/usr/sbin/zabbix_proxy"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "/etc/zabbix/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/", "/usr/bin/"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
set -eux && \
|
||||
|
@ -28,10 +28,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy", "/usr/sbin/zabbix_proxy"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/zabbix/zabbix_proxy.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/sbin/zabbix_proxy", "/usr/sbin/zabbix_proxy"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "/etc/zabbix/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/", "/usr/bin/"]
|
||||
|
||||
RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \
|
||||
set -eux && \
|
||||
|
@ -28,11 +28,10 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_server/zabbix_server", "/usr/sbin/zabbix_server"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_server.conf", "/etc/zabbix/zabbix_server.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_server.sql.gz", "/usr/share/doc/zabbix-server-mysql/create.sql.gz"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/sbin/zabbix_server", "/usr/sbin/zabbix_server"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/conf/", "/etc/zabbix/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/database/mysql/create.sql.gz", "/usr/share/doc/zabbix-server-mysql/create.sql.gz"]
|
||||
|
||||
RUN set -eux && \
|
||||
INSTALL_PKGS="bash \
|
||||
|
@ -28,11 +28,10 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_server/zabbix_server", "/usr/sbin/zabbix_server"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_server.conf", "/etc/zabbix/zabbix_server.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_server.sql.gz", "/usr/share/doc/zabbix-server-mysql/create.sql.gz"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/sbin/zabbix_server", "/usr/sbin/zabbix_server"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/conf/", "/etc/zabbix/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/database/mysql/create.sql.gz", "/usr/share/doc/zabbix-server-mysql/create.sql.gz"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
set -eux && \
|
||||
|
@ -28,11 +28,10 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_server/zabbix_server", "/usr/sbin/zabbix_server"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_server.conf", "/etc/zabbix/zabbix_server.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_server.sql.gz", "/usr/share/doc/zabbix-server-mysql/create.sql.gz"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/sbin/zabbix_server", "/usr/sbin/zabbix_server"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/conf/", "/etc/zabbix/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/database/mysql/create.sql.gz", "/usr/share/doc/zabbix-server-mysql/create.sql.gz"]
|
||||
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
|
@ -47,11 +47,10 @@ LABEL description="Zabbix server with MySQL database support" \
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY ["licenses", "/licenses"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_server/zabbix_server", "/usr/sbin/zabbix_server"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_server.conf", "/etc/zabbix/zabbix_server.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_server.sql.gz", "/usr/share/doc/zabbix-server-mysql/create.sql.gz"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/sbin/zabbix_server", "/usr/sbin/zabbix_server"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/conf/", "/etc/zabbix/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/database/mysql/create.sql.gz", "/usr/share/doc/zabbix-server-mysql/create.sql.gz"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
set -eux && \
|
||||
|
@ -28,11 +28,10 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_server/zabbix_server", "/usr/sbin/zabbix_server"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_server.conf", "/etc/zabbix/zabbix_server.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_server.sql.gz", "/usr/share/doc/zabbix-server-mysql/create.sql.gz"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/sbin/zabbix_server", "/usr/sbin/zabbix_server"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/conf/", "/etc/zabbix/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/database/mysql/create.sql.gz", "/usr/share/doc/zabbix-server-mysql/create.sql.gz"]
|
||||
|
||||
RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \
|
||||
set -eux && \
|
||||
|
@ -28,12 +28,10 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_server/zabbix_server", "/usr/sbin/zabbix_server"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_server.conf", "/etc/zabbix/zabbix_server.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/postgresql/create_server.sql.gz", "/usr/share/doc/zabbix-server-postgresql/create.sql.gz"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/postgresql/timescaledb.sql", "/usr/share/doc/zabbix-server-postgresql/timescaledb.sql"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/sbin/zabbix_server", "/usr/sbin/zabbix_server"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/conf/", "/etc/zabbix/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/database/postgresql/", "/usr/share/doc/zabbix-server-postgresql/"]
|
||||
|
||||
RUN set -eux && \
|
||||
INSTALL_PKGS="bash \
|
||||
|
@ -28,12 +28,10 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_server/zabbix_server", "/usr/sbin/zabbix_server"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_server.conf", "/etc/zabbix/zabbix_server.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/postgresql/create_server.sql.gz", "/usr/share/doc/zabbix-server-postgresql/create.sql.gz"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/postgresql/timescaledb.sql", "/usr/share/doc/zabbix-server-postgresql/timescaledb.sql"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/sbin/zabbix_server", "/usr/sbin/zabbix_server"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/conf/", "/etc/zabbix/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/database/postgresql/", "/usr/share/doc/zabbix-server-postgresql/"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
set -eux && \
|
||||
|
@ -28,12 +28,10 @@ LABEL org.opencontainers.image.title="Zabbix server (PostgreSQL)" \
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_server/zabbix_server", "/usr/sbin/zabbix_server"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_server.conf", "/etc/zabbix/zabbix_server.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/postgresql/create_server.sql.gz", "/usr/share/doc/zabbix-server-postgresql/create.sql.gz"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/postgresql/timescaledb.sql", "/usr/share/doc/zabbix-server-postgresql/timescaledb.sql"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/sbin/zabbix_server", "/usr/sbin/zabbix_server"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/conf/", "/etc/zabbix/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/database/postgresql/", "/usr/share/doc/zabbix-server-postgresql/"]
|
||||
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
|
@ -28,12 +28,10 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_server/zabbix_server", "/usr/sbin/zabbix_server"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_server.conf", "/etc/zabbix/zabbix_server.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/postgresql/create_server.sql.gz", "/usr/share/doc/zabbix-server-postgresql/create.sql.gz"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/postgresql/timescaledb.sql", "/usr/share/doc/zabbix-server-postgresql/timescaledb.sql"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/sbin/zabbix_server", "/usr/sbin/zabbix_server"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/conf/", "/etc/zabbix/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/database/postgresql/", "/usr/share/doc/zabbix-server-postgresql/"]
|
||||
|
||||
RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \
|
||||
set -eux && \
|
||||
|
Loading…
Reference in New Issue
Block a user