diff --git a/.env b/.env index e14e3234a..d6c205f84 100644 --- a/.env +++ b/.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 diff --git a/Dockerfiles/agent/alpine/Dockerfile b/Dockerfiles/agent/alpine/Dockerfile index a1e17ca32..77a71ac9e 100644 --- a/Dockerfiles/agent/alpine/Dockerfile +++ b/Dockerfiles/agent/alpine/Dockerfile @@ -26,10 +26,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov 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 diff --git a/Dockerfiles/build-mysql/centos/Dockerfile b/Dockerfiles/build-mysql/centos/Dockerfile index 8b591bd8e..08db453f4 100644 --- a/Dockerfiles/build-mysql/centos/Dockerfile +++ b/Dockerfiles/build-mysql/centos/Dockerfile @@ -20,6 +20,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov 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 diff --git a/Dockerfiles/build-mysql/ol/Dockerfile b/Dockerfiles/build-mysql/ol/Dockerfile index b0f67c7d0..181028661 100644 --- a/Dockerfiles/build-mysql/ol/Dockerfile +++ b/Dockerfiles/build-mysql/ol/Dockerfile @@ -20,12 +20,29 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov 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 diff --git a/Dockerfiles/build-mysql/rhel/Dockerfile b/Dockerfiles/build-mysql/rhel/Dockerfile index 9dc2661ac..930df2d1d 100644 --- a/Dockerfiles/build-mysql/rhel/Dockerfile +++ b/Dockerfiles/build-mysql/rhel/Dockerfile @@ -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 diff --git a/Dockerfiles/build-mysql/ubuntu/Dockerfile b/Dockerfiles/build-mysql/ubuntu/Dockerfile index bb1a1bbb1..bc1860774 100644 --- a/Dockerfiles/build-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/build-mysql/ubuntu/Dockerfile @@ -20,6 +20,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov 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 diff --git a/Dockerfiles/build-mysql/windows/Dockerfile.agent b/Dockerfiles/build-mysql/windows/Dockerfile.agent index d81f6a0ec..a4e3724e1 100644 --- a/Dockerfiles/build-mysql/windows/Dockerfile.agent +++ b/Dockerfiles/build-mysql/windows/Dockerfile.agent @@ -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 " ` @@ -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...'; diff --git a/Dockerfiles/build-mysql/windows/Dockerfile.agent2 b/Dockerfiles/build-mysql/windows/Dockerfile.agent2 index a38d25947..62d451b4f 100644 --- a/Dockerfiles/build-mysql/windows/Dockerfile.agent2 +++ b/Dockerfiles/build-mysql/windows/Dockerfile.agent2 @@ -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 " ` @@ -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...'; diff --git a/Dockerfiles/build-pgsql/alpine/Dockerfile b/Dockerfiles/build-pgsql/alpine/Dockerfile index 6efa758e3..61c439908 100644 --- a/Dockerfiles/build-pgsql/alpine/Dockerfile +++ b/Dockerfiles/build-pgsql/alpine/Dockerfile @@ -20,6 +20,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov 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 diff --git a/Dockerfiles/build-pgsql/centos/Dockerfile b/Dockerfiles/build-pgsql/centos/Dockerfile index cb2042361..f2b34453e 100644 --- a/Dockerfiles/build-pgsql/centos/Dockerfile +++ b/Dockerfiles/build-pgsql/centos/Dockerfile @@ -20,6 +20,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov 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 diff --git a/Dockerfiles/build-pgsql/ol/Dockerfile b/Dockerfiles/build-pgsql/ol/Dockerfile index e7fc7fe86..9d2a03d86 100644 --- a/Dockerfiles/build-pgsql/ol/Dockerfile +++ b/Dockerfiles/build-pgsql/ol/Dockerfile @@ -20,12 +20,29 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov 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 diff --git a/Dockerfiles/build-pgsql/ubuntu/Dockerfile b/Dockerfiles/build-pgsql/ubuntu/Dockerfile index 7187e1c2a..b7eb110a7 100644 --- a/Dockerfiles/build-pgsql/ubuntu/Dockerfile +++ b/Dockerfiles/build-pgsql/ubuntu/Dockerfile @@ -20,6 +20,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov 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 diff --git a/Dockerfiles/build-sqlite3/alpine/Dockerfile b/Dockerfiles/build-sqlite3/alpine/Dockerfile index cada64426..b3ee8ebac 100644 --- a/Dockerfiles/build-sqlite3/alpine/Dockerfile +++ b/Dockerfiles/build-sqlite3/alpine/Dockerfile @@ -20,6 +20,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov