From 965c374bae5da751a738e451289fbedcc410b680 Mon Sep 17 00:00:00 2001 From: Alexey Pustovalov Date: Sat, 1 Jun 2024 15:10:31 +0900 Subject: [PATCH] Updated build output structure --- .env | 2 + Dockerfiles/agent/alpine/Dockerfile | 7 +- Dockerfiles/agent/centos/Dockerfile | 7 +- Dockerfiles/agent/ol/Dockerfile | 7 +- Dockerfiles/agent/rhel/Dockerfile | 7 +- Dockerfiles/agent/ubuntu/Dockerfile | 7 +- Dockerfiles/agent/windows/Dockerfile | 2 +- Dockerfiles/agent2/alpine/Dockerfile | 12 +- .../agent2/alpine/docker-entrypoint.sh | 6 +- Dockerfiles/agent2/centos/Dockerfile | 12 +- .../agent2/centos/docker-entrypoint.sh | 6 +- Dockerfiles/agent2/ol/Dockerfile | 12 +- Dockerfiles/agent2/ol/docker-entrypoint.sh | 6 +- Dockerfiles/agent2/rhel/Dockerfile | 12 +- Dockerfiles/agent2/rhel/docker-entrypoint.sh | 6 +- Dockerfiles/agent2/ubuntu/Dockerfile | 12 +- .../agent2/ubuntu/docker-entrypoint.sh | 6 +- Dockerfiles/agent2/windows/Dockerfile | 2 +- .../agent2/windows/docker-entrypoint.ps1 | 10 +- Dockerfiles/build-mysql/alpine/Dockerfile | 118 ++++++++++++----- Dockerfiles/build-mysql/centos/Dockerfile | 118 ++++++++++++----- Dockerfiles/build-mysql/ol/Dockerfile | 118 ++++++++++++----- Dockerfiles/build-mysql/rhel/Dockerfile | 118 ++++++++++++----- Dockerfiles/build-mysql/ubuntu/Dockerfile | 118 ++++++++++++----- .../build-mysql/windows/Dockerfile.agent | 29 +++-- .../build-mysql/windows/Dockerfile.agent2 | 78 +++++++---- .../windows/Dockerfile_llvm_clang.agent2 | 81 ++++++++---- .../windows/Dockerfile_vcpkg.agent2 | 81 ++++++++---- Dockerfiles/build-pgsql/alpine/Dockerfile | 123 +++++++++++++----- Dockerfiles/build-pgsql/centos/Dockerfile | 123 +++++++++++++----- Dockerfiles/build-pgsql/ol/Dockerfile | 123 +++++++++++++----- Dockerfiles/build-pgsql/rhel/Dockerfile | 123 +++++++++++++----- Dockerfiles/build-pgsql/ubuntu/Dockerfile | 123 +++++++++++++----- Dockerfiles/build-sqlite3/alpine/Dockerfile | 88 ++++++++++--- Dockerfiles/build-sqlite3/centos/Dockerfile | 88 ++++++++++--- Dockerfiles/build-sqlite3/ol/Dockerfile | 88 ++++++++++--- Dockerfiles/build-sqlite3/rhel/Dockerfile | 88 ++++++++++--- Dockerfiles/build-sqlite3/ubuntu/Dockerfile | 88 ++++++++++--- Dockerfiles/java-gateway/alpine/Dockerfile | 4 +- Dockerfiles/java-gateway/centos/Dockerfile | 3 +- Dockerfiles/java-gateway/ol/Dockerfile | 3 +- Dockerfiles/java-gateway/rhel/Dockerfile | 4 +- Dockerfiles/java-gateway/ubuntu/Dockerfile | 3 +- Dockerfiles/proxy-mysql/alpine/Dockerfile | 9 +- Dockerfiles/proxy-mysql/centos/Dockerfile | 9 +- Dockerfiles/proxy-mysql/ol/Dockerfile | 9 +- Dockerfiles/proxy-mysql/rhel/Dockerfile | 9 +- Dockerfiles/proxy-mysql/ubuntu/Dockerfile | 9 +- Dockerfiles/proxy-sqlite3/alpine/Dockerfile | 7 +- Dockerfiles/proxy-sqlite3/centos/Dockerfile | 7 +- Dockerfiles/proxy-sqlite3/ol/Dockerfile | 7 +- Dockerfiles/proxy-sqlite3/rhel/Dockerfile | 7 +- Dockerfiles/proxy-sqlite3/ubuntu/Dockerfile | 7 +- Dockerfiles/server-mysql/alpine/Dockerfile | 9 +- Dockerfiles/server-mysql/centos/Dockerfile | 9 +- Dockerfiles/server-mysql/ol/Dockerfile | 9 +- Dockerfiles/server-mysql/rhel/Dockerfile | 9 +- Dockerfiles/server-mysql/ubuntu/Dockerfile | 9 +- Dockerfiles/server-pgsql/alpine/Dockerfile | 12 +- Dockerfiles/server-pgsql/centos/Dockerfile | 12 +- Dockerfiles/server-pgsql/ol/Dockerfile | 12 +- Dockerfiles/server-pgsql/rhel/Dockerfile | 12 +- Dockerfiles/server-pgsql/ubuntu/Dockerfile | 12 +- Dockerfiles/web-service/alpine/Dockerfile | 4 +- Dockerfiles/web-service/centos/Dockerfile | 4 +- Dockerfiles/web-service/ol/Dockerfile | 4 +- Dockerfiles/web-service/rhel/Dockerfile | 4 +- Dockerfiles/web-service/ubuntu/Dockerfile | 4 +- 68 files changed, 1565 insertions(+), 712 deletions(-) diff --git a/.env b/.env index fc6af7574..c36ef45a6 100644 --- a/.env +++ b/.env @@ -26,6 +26,8 @@ MYSQL_IMAGE=mysql MYSQL_IMAGE_TAG=8.0-oracle POSTGRESQL_IMAGE=postgres POSTGRESQL_IMAGE_TAG=16-alpine +#POSTGRESQL_IMAGE=timescale/timescaledb +#POSTGRESQL_IMAGE_TAG=2.14.2-pg16 ELASTICSEARCH_IMAGE=elasticsearch ELASTICSEARCH_IMAGE_TAG=latest diff --git a/Dockerfiles/agent/alpine/Dockerfile b/Dockerfiles/agent/alpine/Dockerfile index 16f92439d..c5d6f7117 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 && \ - strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_web_service && \ + 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 && \ + strip ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_web_service && \ + 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 -R ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_agent2.d/ ${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/go/bin/zabbix_web_service ${ZBX_OUTPUT_DIR}/web_service/sbin/ && \ + cp ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_web_service.conf ${ZBX_OUTPUT_DIR}/web_service/conf/ && \ + 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 && \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb_plugin && \ - cd /tmp/mongodb_plugin && \ + mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ && \ + mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \ + cd /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \ make && \ - strip /tmp/mongodb_plugin/zabbix-agent2-plugin-mongodb && \ + strip /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb && \ + cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mongodb && \ + cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/mongodb.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql_plugin && \ - cd /tmp/postgresql_plugin && \ + git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \ + cd /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \ make && \ - strip /tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql + strip /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql && \ + cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/postgresql && \ + cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/postgresql.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + cd /tmp/ && \ + git -c advice.detachedHead=false clone ${MSSQL_PLUGIN_SOURCES} --branch ${MSSQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \ + cd /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \ + make && \ + strip /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql && \ + cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mssql && \ + cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/mssql.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + cd /tmp/ && \ + git -c advice.detachedHead=false clone ${EMBER_PLUS_PLUGIN_SOURCES} --branch ${EMBER_PLUS_PLUGIN_VERSION} --depth 1 --single-branch /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \ + cd /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \ + make && \ + strip /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus && \ + cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ember-plus && \ + cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/ember.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ diff --git a/Dockerfiles/build-mysql/centos/Dockerfile b/Dockerfiles/build-mysql/centos/Dockerfile index b1c27ce21..08187dec7 100644 --- a/Dockerfiles/build-mysql/centos/Dockerfile +++ b/Dockerfiles/build-mysql/centos/Dockerfile @@ -20,16 +20,37 @@ 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 && \ - strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_web_service && \ + 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 && \ + strip ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_web_service && \ + 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 -R ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_agent2.d/ ${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/go/bin/zabbix_web_service ${ZBX_OUTPUT_DIR}/web_service/sbin/ && \ + cp ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_web_service.conf ${ZBX_OUTPUT_DIR}/web_service/conf/ && \ + 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 && \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb_plugin && \ - cd /tmp/mongodb_plugin && \ + mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ && \ + mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \ + cd /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \ make && \ - strip /tmp/mongodb_plugin/zabbix-agent2-plugin-mongodb && \ + strip /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb && \ + cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mongodb && \ + cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/mongodb.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql_plugin && \ - cd /tmp/postgresql_plugin && \ + git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \ + cd /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \ make && \ - strip /tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql + strip /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql && \ + cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/postgresql && \ + cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/postgresql.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + cd /tmp/ && \ + git -c advice.detachedHead=false clone ${MSSQL_PLUGIN_SOURCES} --branch ${MSSQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \ + cd /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \ + make && \ + strip /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql && \ + cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mssql && \ + cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/mssql.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + cd /tmp/ && \ + git -c advice.detachedHead=false clone ${EMBER_PLUS_PLUGIN_SOURCES} --branch ${EMBER_PLUS_PLUGIN_VERSION} --depth 1 --single-branch /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \ + cd /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \ + make && \ + strip /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus && \ + cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ember-plus && \ + cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/ember.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ diff --git a/Dockerfiles/build-mysql/ol/Dockerfile b/Dockerfiles/build-mysql/ol/Dockerfile index 7304b5ba2..be0f435b9 100644 --- a/Dockerfiles/build-mysql/ol/Dockerfile +++ b/Dockerfiles/build-mysql/ol/Dockerfile @@ -20,16 +20,37 @@ 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 && \ - strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_web_service && \ + 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 && \ + strip ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_web_service && \ + 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 -R ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_agent2.d/ ${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/go/bin/zabbix_web_service ${ZBX_OUTPUT_DIR}/web_service/sbin/ && \ + cp ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_web_service.conf ${ZBX_OUTPUT_DIR}/web_service/conf/ && \ + 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 && \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb_plugin && \ - cd /tmp/mongodb_plugin && \ + mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ && \ + mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \ + cd /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \ make && \ - strip /tmp/mongodb_plugin/zabbix-agent2-plugin-mongodb && \ + strip /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb && \ + cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mongodb && \ + cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/mongodb.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql_plugin && \ - cd /tmp/postgresql_plugin && \ + git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \ + cd /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \ make && \ - strip /tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql + strip /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql && \ + cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/postgresql && \ + cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/postgresql.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + cd /tmp/ && \ + git -c advice.detachedHead=false clone ${MSSQL_PLUGIN_SOURCES} --branch ${MSSQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \ + cd /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \ + make && \ + strip /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql && \ + cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mssql && \ + cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/mssql.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + cd /tmp/ && \ + git -c advice.detachedHead=false clone ${EMBER_PLUS_PLUGIN_SOURCES} --branch ${EMBER_PLUS_PLUGIN_VERSION} --depth 1 --single-branch /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \ + cd /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \ + make && \ + strip /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus && \ + cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ember-plus && \ + cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/ember.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ diff --git a/Dockerfiles/build-mysql/rhel/Dockerfile b/Dockerfiles/build-mysql/rhel/Dockerfile index 60ee11b83..ea044270c 100644 --- a/Dockerfiles/build-mysql/rhel/Dockerfile +++ b/Dockerfiles/build-mysql/rhel/Dockerfile @@ -31,16 +31,37 @@ LABEL description="Zabbix build base for MySQL based images" \ org.label-schema.vcs-ref="${VCS_REF}" \ org.label-schema.vendor="Zabbix SIA" -ENV MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git MONGODB_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} \ - POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git POSTGRESQL_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} +ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_VERSION}-output \ + DB_TYPE=mysql \ + MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git MONGODB_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} \ + POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git POSTGRESQL_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} \ + MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git MSSQL_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} \ + EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} RUN --mount=type=cache,target=/root/.cache/go-build/ \ --mount=type=cache,target=/root/go/ \ --mount=type=bind,source=conf/chromedp_no_sandbox.patch,target=/tmp/chromedp_no_sandbox.patch \ 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}/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}/web_service/sbin/ && \ + mkdir -p ${ZBX_OUTPUT_DIR}/web_service/conf/ && \ + 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} && \ patch -p1 < /tmp/chromedp_no_sandbox.patch && \ zabbix_revision=`git rev-parse --short HEAD` && \ sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \ @@ -65,7 +86,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \ --with-libmodbus \ --with-libpcre2 \ --with-libxml2 \ - --with-mysql \ + --with-${DB_TYPE} \ --with-net-snmp \ --with-openipmi \ --with-openssl \ @@ -76,37 +97,72 @@ 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 && \ - strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_web_service && \ + 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 && \ + strip ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_web_service && \ + 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 -R ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_agent2.d/ ${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/go/bin/zabbix_web_service ${ZBX_OUTPUT_DIR}/web_service/sbin/ && \ + cp ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_web_service.conf ${ZBX_OUTPUT_DIR}/web_service/conf/ && \ + 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 && \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb_plugin && \ - cd /tmp/mongodb_plugin && \ + mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ && \ + mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \ + cd /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \ make && \ - strip /tmp/mongodb_plugin/zabbix-agent2-plugin-mongodb && \ + strip /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb && \ + cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mongodb && \ + cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/mongodb.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql_plugin && \ - cd /tmp/postgresql_plugin && \ + git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \ + cd /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \ make && \ - strip /tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql + strip /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql && \ + cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/postgresql && \ + cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/postgresql.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + cd /tmp/ && \ + git -c advice.detachedHead=false clone ${MSSQL_PLUGIN_SOURCES} --branch ${MSSQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \ + cd /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \ + make && \ + strip /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql && \ + cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mssql && \ + cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/mssql.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + cd /tmp/ && \ + git -c advice.detachedHead=false clone ${EMBER_PLUS_PLUGIN_SOURCES} --branch ${EMBER_PLUS_PLUGIN_VERSION} --depth 1 --single-branch /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \ + cd /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \ + make && \ + strip /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus && \ + cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ember-plus && \ + cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/ember.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ diff --git a/Dockerfiles/build-mysql/ubuntu/Dockerfile b/Dockerfiles/build-mysql/ubuntu/Dockerfile index cd155998d..12b076e2e 100644 --- a/Dockerfiles/build-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/build-mysql/ubuntu/Dockerfile @@ -20,16 +20,37 @@ 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 && \ - strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_web_service && \ + 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 && \ + strip ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_web_service && \ + 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 -R ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_agent2.d/ ${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/go/bin/zabbix_web_service ${ZBX_OUTPUT_DIR}/web_service/sbin/ && \ + cp ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_web_service.conf ${ZBX_OUTPUT_DIR}/web_service/conf/ && \ + 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 && \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb_plugin && \ - cd /tmp/mongodb_plugin && \ + mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ && \ + mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \ + cd /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \ make && \ - strip /tmp/mongodb_plugin/zabbix-agent2-plugin-mongodb && \ + strip /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb && \ + cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mongodb && \ + cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/mongodb.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql_plugin && \ - cd /tmp/postgresql_plugin && \ + git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \ + cd /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \ make && \ - strip /tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql + strip /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql && \ + cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/postgresql && \ + cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/postgresql.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + cd /tmp/ && \ + git -c advice.detachedHead=false clone ${MSSQL_PLUGIN_SOURCES} --branch ${MSSQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \ + cd /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \ + make && \ + strip /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql && \ + cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mssql && \ + cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/mssql.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + cd /tmp/ && \ + git -c advice.detachedHead=false clone ${EMBER_PLUS_PLUGIN_SOURCES} --branch ${EMBER_PLUS_PLUGIN_VERSION} --depth 1 --single-branch /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \ + cd /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \ + make && \ + strip /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus && \ + cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ember-plus && \ + cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/ember.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ diff --git a/Dockerfiles/build-mysql/windows/Dockerfile.agent b/Dockerfiles/build-mysql/windows/Dockerfile.agent index 1b53886a3..7c879a12a 100644 --- a/Dockerfiles/build-mysql/windows/Dockerfile.agent +++ b/Dockerfiles/build-mysql/windows/Dockerfile.agent @@ -15,7 +15,8 @@ ARG GIT_BRANCH=master 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 ` @@ -63,11 +64,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 198307280..2be2f036e 100644 --- a/Dockerfiles/build-mysql/windows/Dockerfile.agent2 +++ b/Dockerfiles/build-mysql/windows/Dockerfile.agent2 @@ -14,12 +14,17 @@ ARG ZABBIX_VERSION_RC_NUM=2400 ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git ARG POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git +ARG MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git +ARG EMBER_PLUS_PLUGIN_SOURCES=ttps://git.zabbix.com/scm/ap/ember-plus.git ARG GIT_BRANCH=master ENV ZBX_SOURCES=$ZBX_SOURCES MAJOR_VERSION=$MAJOR_VERSION ZBX_VERSION=$ZBX_VERSION GIT_BRANCH=${GIT_BRANCH:-$ZBX_VERSION} ` MONGODB_PLUGIN_SOURCES=$MONGODB_PLUGIN_SOURCES MONGODB_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ` POSTGRESQL_PLUGIN_SOURCES=$POSTGRESQL_PLUGIN_SOURCES POSTGRESQL_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ` - ZABBIX_VERSION_RC_NUM=$ZABBIX_VERSION_RC_NUM + MSSQL_PLUGIN_SOURCES=$MSSQL_PLUGIN_SOURCES MSSQL_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ` + EMBER_PLUS_PLUGIN_SOURCES=$EMBER_PLUS_PLUGIN_SOURCES EMBER_PLUS_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ` + 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 " ` @@ -33,25 +38,25 @@ 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""" ` CGO_LDFLAGS="""-lcrypt32 -L$env:BUILD_OUTPUT\openssl\lib -L$env:BUILD_OUTPUT\pcre2\lib""" ` PCRE2=$env:BUILD_OUTPUT\pcre2 ` @@ -59,34 +64,59 @@ RUN Set-Location -Path $env:SystemDrive\.; ` 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 ('Building Zabbix MongoDB plugin {0} version ...' -f $env:MONGODB_PLUGIN_VERSION); ` - git -c advice.detachedHead=false clone $env:MONGODB_PLUGIN_SOURCES --branch $env:MONGODB_PLUGIN_VERSION --depth 1 --single-branch $env:SystemDrive\zabbix_src\mongodb_plugin; ` - Set-Location -Path $env:SystemDrive\zabbix_src\mongodb_plugin; ` + git -c advice.detachedHead=false clone $env:MONGODB_PLUGIN_SOURCES --branch $env:MONGODB_PLUGIN_VERSION --depth 1 --single-branch $env:SystemDrive\mongodb-plugin-$env:MONGODB_PLUGIN_VERSION; ` + Set-Location -Path $env:SystemDrive\mongodb-plugin-$env:MONGODB_PLUGIN_VERSION; ` mingw32-make; ` ` Write-Host 'Verifying MongoDB plugin ("zabbix-agent2-plugin-mongodb.exe -V") ...'; ` - & $env:SystemDrive\zabbix_src\mongodb_plugin\zabbix-agent2-plugin-mongodb.exe -V; ` + & $env:SystemDrive\mongodb-plugin-$env:MONGODB_PLUGIN_VERSION\zabbix-agent2-plugin-mongodb.exe -V; ` ` - Copy-Item -Path $env:SystemDrive\zabbix_src\mongodb_plugin\zabbix-agent2-plugin-mongodb.exe $env:SystemDrive\zabbix_output\zabbix-agent2-plugin; ` - Copy-Item -Path $env:SystemDrive\zabbix_src\mongodb_plugin\mongodb.conf $env:SystemDrive\zabbix_output\conf\zabbix_agentd.d; ` + Copy-Item -Path $env:SystemDrive\mongodb-plugin-$env:MONGODB_PLUGIN_VERSION\zabbix-agent2-plugin-mongodb.exe $env:ZBX_OUTPUT_DIR\zabbix-agent2-plugin\mongodb.exe; ` + Copy-Item -Path $env:SystemDrive\mongodb-plugin-$env:MONGODB_PLUGIN_VERSION\mongodb.conf $env:ZBX_OUTPUT_DIR\conf\zabbix_agentd.d; ` mingw32-make -s clean; ` ` Write-Host ('Building Zabbix PostgreSQL plugin {0} version ...' -f $env:POSTGRESQL_PLUGIN_VERSION); ` - git -c advice.detachedHead=false clone $env:POSTGRESQL_PLUGIN_SOURCES --branch $env:POSTGRESQL_PLUGIN_VERSION --depth 1 --single-branch $env:SystemDrive\zabbix_src\postgresql_plugin; ` - Set-Location -Path $env:SystemDrive\zabbix_src\postgresql_plugin; ` + git -c advice.detachedHead=false clone $env:POSTGRESQL_PLUGIN_SOURCES --branch $env:POSTGRESQL_PLUGIN_VERSION --depth 1 --single-branch $env:SystemDrive\postgresql-plugin-$env:POSTGRESQL_PLUGIN_VERSION; ` + Set-Location -Path $env:SystemDrive\postgresql-plugin-$env:POSTGRESQL_PLUGIN_VERSION; ` mingw32-make; ` ` Write-Host 'Verifying build ("zabbix-agent2-plugin-postgresql.exe -V") ...'; ` - & $env:SystemDrive\zabbix_src\postgresql_plugin\zabbix-agent2-plugin-postgresql.exe -V; ` + & $env:SystemDrive\postgresql-plugin-$env:POSTGRESQL_PLUGIN_VERSION\zabbix-agent2-plugin-postgresql.exe -V; ` ` - Copy-Item -Path $env:SystemDrive\zabbix_src\postgresql_plugin\zabbix-agent2-plugin-postgresql.exe $env:SystemDrive\zabbix_output\zabbix-agent2-plugin; ` - Copy-Item -Path $env:SystemDrive\zabbix_src\postgresql_plugin\postgresql.conf $env:SystemDrive\zabbix_output\conf\zabbix_agentd.d; ` + Copy-Item -Path $env:SystemDrive\postgresql-plugin-$env:POSTGRESQL_PLUGIN_VERSION\zabbix-agent2-plugin-postgresql.exe $env:ZBX_OUTPUT_DIR\zabbix-agent2-plugin\postgresql.exe; ` + Copy-Item -Path $env:SystemDrive\postgresql-plugin-$env:POSTGRESQL_PLUGIN_VERSION\postgresql.conf $env:ZBX_OUTPUT_DIR\conf\zabbix_agentd.d; ` + mingw32-make -s clean; ` + ` + Write-Host ('Building Zabbix MSSQL plugin {0} version ...' -f $env:MSSQL_PLUGIN_VERSION); ` + git -c advice.detachedHead=false clone $env:MSSQL_PLUGIN_SOURCES --branch $env:MSSQL_PLUGIN_VERSION --depth 1 --single-branch $env:SystemDrive\mssql-plugin-$env:MSSQL_PLUGIN_VERSION; ` + Set-Location -Path $env:SystemDrive\mssql-plugin-$env:MSSQL_PLUGIN_VERSION; ` + mingw32-make; ` + ` + Write-Host 'Verifying MSSQL plugin ("zabbix-agent2-plugin-mssql.exe -V") ...'; ` + & $env:SystemDrive\mssql-plugin-$env:MSSQL_PLUGIN_VERSION\zabbix-agent2-plugin-mssql.exe -V; ` + ` + Copy-Item -Path $env:SystemDrive\mssql-plugin-$env:MSSQL_PLUGIN_VERSION\zabbix-agent2-plugin-mssql.exe $env:ZBX_OUTPUT_DIR\zabbix-agent2-plugin\mssql.exe; ` + Copy-Item -Path $env:SystemDrive\mssql-plugin-$env:MSSQL_PLUGIN_VERSION\mssql.conf $env:ZBX_OUTPUT_DIR\conf\zabbix_agentd.d; ` + mingw32-make -s clean; ` + ` + + Write-Host ('Building Zabbix Ember+ plugin {0} version ...' -f $env:EMBER_PLUS_PLUGIN_VERSION); ` + git -c advice.detachedHead=false clone $env:EMBER_PLUS_PLUGIN_SOURCES --branch $env:EMBER_PLUS_PLUGIN_VERSION --depth 1 --single-branch $env:SystemDrive\ember-plus-plugin-$env:EMBER_PLUS_PLUGIN_VERSION; ` + Set-Location -Path $env:SystemDrive\ember-plus-plugin-$env:EMBER_PLUS_PLUGIN_VERSION; ` + mingw32-make; ` + ` + Write-Host 'Verifying Ember+ plugin ("zabbix-agent2-plugin-ember-plus.exe -V") ...'; ` + & $env:SystemDrive\ember-plus-plugin-$env:EMBER_PLUS_PLUGIN_VERSION\zabbix-agent2-plugin-ember-plus.exe -V; ` + ` + Copy-Item -Path $env:SystemDrive\ember-plus-plugin-$env:EMBER_PLUS_PLUGIN_VERSION\zabbix-agent2-plugin-ember-plus.exe $env:ZBX_OUTPUT_DIR\zabbix-agent2-plugin\ember-plus.exe; ` + Copy-Item -Path $env:SystemDrive\ember-plus-plugin-$env:EMBER_PLUS_PLUGIN_VERSION\ember.conf $env:ZBX_OUTPUT_DIR\conf\zabbix_agentd.d; ` mingw32-make -s clean; ` Write-Host 'Zabbix binaries are compiled...'; diff --git a/Dockerfiles/build-mysql/windows/Dockerfile_llvm_clang.agent2 b/Dockerfiles/build-mysql/windows/Dockerfile_llvm_clang.agent2 index 6a0a11f9b..0e4762e2a 100644 --- a/Dockerfiles/build-mysql/windows/Dockerfile_llvm_clang.agent2 +++ b/Dockerfiles/build-mysql/windows/Dockerfile_llvm_clang.agent2 @@ -14,11 +14,17 @@ ARG ZABBIX_VERSION_RC_NUM=2400 ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git ARG POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git +ARG MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git +ARG EMBER_PLUS_PLUGIN_SOURCES=ttps://git.zabbix.com/scm/ap/ember-plus.git ARG GIT_BRANCH=master -ENV ZBX_SOURCES=$ZBX_SOURCES MAJOR_VERSION=$MAJOR_VERSION GIT_BRANCH=${GIT_BRANCH:-$ZBX_VERSION} ` +ENV ZBX_SOURCES=$ZBX_SOURCES MAJOR_VERSION=$MAJOR_VERSION ZBX_VERSION=$ZBX_VERSION GIT_BRANCH=${GIT_BRANCH:-$ZBX_VERSION} ` MONGODB_PLUGIN_SOURCES=$MONGODB_PLUGIN_SOURCES MONGODB_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ` - POSTGRESQL_PLUGIN_SOURCES=$POSTGRESQL_PLUGIN_SOURCES POSTGRESQL_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} + POSTGRESQL_PLUGIN_SOURCES=$POSTGRESQL_PLUGIN_SOURCES POSTGRESQL_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ` + MSSQL_PLUGIN_SOURCES=$MSSQL_PLUGIN_SOURCES MSSQL_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ` + EMBER_PLUS_PLUGIN_SOURCES=$EMBER_PLUS_PLUGIN_SOURCES EMBER_PLUS_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ` + 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 " ` @@ -32,25 +38,25 @@ 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""" ` CGO_LDFLAGS="""-l:libiconv.a -lcrypt32 -L$env:BUILD_OUTPUT\openssl\lib -L$env:BUILD_OUTPUT\pcre2\lib""" ` PCRE2=$env:BUILD_OUTPUT\pcre2 ` @@ -58,34 +64,59 @@ RUN Set-Location -Path $env:SystemDrive\.; ` 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 ('Building Zabbix MongoDB plugin {0} version ...' -f $env:MONGODB_PLUGIN_VERSION); ` - git -c advice.detachedHead=false clone $env:MONGODB_PLUGIN_SOURCES --branch $env:MONGODB_PLUGIN_VERSION --depth 1 --single-branch $env:SystemDrive\zabbix_src\mongodb_plugin; ` - Set-Location -Path $env:SystemDrive\zabbix_src\mongodb_plugin; ` + git -c advice.detachedHead=false clone $env:MONGODB_PLUGIN_SOURCES --branch $env:MONGODB_PLUGIN_VERSION --depth 1 --single-branch $env:SystemDrive\mongodb-plugin-$env:MONGODB_PLUGIN_VERSION; ` + Set-Location -Path $env:SystemDrive\mongodb-plugin-$env:MONGODB_PLUGIN_VERSION; ` mingw32-make; ` ` Write-Host 'Verifying MongoDB plugin ("zabbix-agent2-plugin-mongodb.exe -V") ...'; ` - & $env:SystemDrive\zabbix_src\mongodb_plugin\zabbix-agent2-plugin-mongodb.exe -V; ` + & $env:SystemDrive\mongodb-plugin-$env:MONGODB_PLUGIN_VERSION\zabbix-agent2-plugin-mongodb.exe -V; ` ` - Copy-Item -Path $env:SystemDrive\zabbix_src\mongodb_plugin\zabbix-agent2-plugin-mongodb.exe $env:SystemDrive\zabbix_output\zabbix-agent2-plugin; ` - Copy-Item -Path $env:SystemDrive\zabbix_src\mongodb_plugin\mongodb.conf $env:SystemDrive\zabbix_output\conf\zabbix_agentd.d; ` + Copy-Item -Path $env:SystemDrive\mongodb-plugin-$env:MONGODB_PLUGIN_VERSION\zabbix-agent2-plugin-mongodb.exe $env:ZBX_OUTPUT_DIR\zabbix-agent2-plugin\mongodb.exe; ` + Copy-Item -Path $env:SystemDrive\mongodb-plugin-$env:MONGODB_PLUGIN_VERSION\mongodb.conf $env:ZBX_OUTPUT_DIR\conf\zabbix_agentd.d; ` mingw32-make -s clean; ` ` Write-Host ('Building Zabbix PostgreSQL plugin {0} version ...' -f $env:POSTGRESQL_PLUGIN_VERSION); ` - git -c advice.detachedHead=false clone $env:POSTGRESQL_PLUGIN_SOURCES --branch $env:POSTGRESQL_PLUGIN_VERSION --depth 1 --single-branch $env:SystemDrive\zabbix_src\postgresql_plugin; ` - Set-Location -Path $env:SystemDrive\zabbix_src\postgresql_plugin; ` + git -c advice.detachedHead=false clone $env:POSTGRESQL_PLUGIN_SOURCES --branch $env:POSTGRESQL_PLUGIN_VERSION --depth 1 --single-branch $env:SystemDrive\postgresql-plugin-$env:POSTGRESQL_PLUGIN_VERSION; ` + Set-Location -Path $env:SystemDrive\postgresql-plugin-$env:POSTGRESQL_PLUGIN_VERSION; ` mingw32-make; ` ` Write-Host 'Verifying build ("zabbix-agent2-plugin-postgresql.exe -V") ...'; ` - & $env:SystemDrive\zabbix_src\postgresql_plugin\zabbix-agent2-plugin-postgresql.exe -V; ` + & $env:SystemDrive\postgresql-plugin-$env:POSTGRESQL_PLUGIN_VERSION\zabbix-agent2-plugin-postgresql.exe -V; ` ` - Copy-Item -Path $env:SystemDrive\zabbix_src\postgresql_plugin\zabbix-agent2-plugin-postgresql.exe $env:SystemDrive\zabbix_output\zabbix-agent2-plugin; ` - Copy-Item -Path $env:SystemDrive\zabbix_src\postgresql_plugin\postgresql.conf $env:SystemDrive\zabbix_output\conf\zabbix_agentd.d; ` + Copy-Item -Path $env:SystemDrive\postgresql-plugin-$env:POSTGRESQL_PLUGIN_VERSION\zabbix-agent2-plugin-postgresql.exe $env:ZBX_OUTPUT_DIR\zabbix-agent2-plugin\postgresql.exe; ` + Copy-Item -Path $env:SystemDrive\postgresql-plugin-$env:POSTGRESQL_PLUGIN_VERSION\postgresql.conf $env:ZBX_OUTPUT_DIR\conf\zabbix_agentd.d; ` + mingw32-make -s clean; ` + ` + Write-Host ('Building Zabbix MSSQL plugin {0} version ...' -f $env:MSSQL_PLUGIN_VERSION); ` + git -c advice.detachedHead=false clone $env:MSSQL_PLUGIN_SOURCES --branch $env:MSSQL_PLUGIN_VERSION --depth 1 --single-branch $env:SystemDrive\mssql-plugin-$env:MSSQL_PLUGIN_VERSION; ` + Set-Location -Path $env:SystemDrive\mssql-plugin-$env:MSSQL_PLUGIN_VERSION; ` + mingw32-make; ` + ` + Write-Host 'Verifying MSSQL plugin ("zabbix-agent2-plugin-mssql.exe -V") ...'; ` + & $env:SystemDrive\mssql-plugin-$env:MSSQL_PLUGIN_VERSION\zabbix-agent2-plugin-mssql.exe -V; ` + ` + Copy-Item -Path $env:SystemDrive\mssql-plugin-$env:MSSQL_PLUGIN_VERSION\zabbix-agent2-plugin-mssql.exe $env:ZBX_OUTPUT_DIR\zabbix-agent2-plugin\mssql.exe; ` + Copy-Item -Path $env:SystemDrive\mssql-plugin-$env:MSSQL_PLUGIN_VERSION\mssql.conf $env:ZBX_OUTPUT_DIR\conf\zabbix_agentd.d; ` + mingw32-make -s clean; ` + ` + + Write-Host ('Building Zabbix Ember+ plugin {0} version ...' -f $env:EMBER_PLUS_PLUGIN_VERSION); ` + git -c advice.detachedHead=false clone $env:EMBER_PLUS_PLUGIN_SOURCES --branch $env:EMBER_PLUS_PLUGIN_VERSION --depth 1 --single-branch $env:SystemDrive\ember-plus-plugin-$env:EMBER_PLUS_PLUGIN_VERSION; ` + Set-Location -Path $env:SystemDrive\ember-plus-plugin-$env:EMBER_PLUS_PLUGIN_VERSION; ` + mingw32-make; ` + ` + Write-Host 'Verifying Ember+ plugin ("zabbix-agent2-plugin-ember-plus.exe -V") ...'; ` + & $env:SystemDrive\ember-plus-plugin-$env:EMBER_PLUS_PLUGIN_VERSION\zabbix-agent2-plugin-ember-plus.exe -V; ` + ` + Copy-Item -Path $env:SystemDrive\ember-plus-plugin-$env:EMBER_PLUS_PLUGIN_VERSION\zabbix-agent2-plugin-ember-plus.exe $env:ZBX_OUTPUT_DIR\zabbix-agent2-plugin\ember-plus.exe; ` + Copy-Item -Path $env:SystemDrive\ember-plus-plugin-$env:EMBER_PLUS_PLUGIN_VERSION\ember.conf $env:ZBX_OUTPUT_DIR\conf\zabbix_agentd.d; ` mingw32-make -s clean; ` Write-Host 'Zabbix binaries are compiled...'; diff --git a/Dockerfiles/build-mysql/windows/Dockerfile_vcpkg.agent2 b/Dockerfiles/build-mysql/windows/Dockerfile_vcpkg.agent2 index 7979e2720..c7af9a373 100644 --- a/Dockerfiles/build-mysql/windows/Dockerfile_vcpkg.agent2 +++ b/Dockerfiles/build-mysql/windows/Dockerfile_vcpkg.agent2 @@ -14,11 +14,17 @@ ARG ZABBIX_VERSION_RC_NUM=2400 ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git ARG POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git +ARG MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git +ARG EMBER_PLUS_PLUGIN_SOURCES=ttps://git.zabbix.com/scm/ap/ember-plus.git ARG GIT_BRANCH=master -ENV ZBX_SOURCES=$ZBX_SOURCES MAJOR_VERSION=$MAJOR_VERSION GIT_BRANCH=${GIT_BRANCH:-$ZBX_VERSION} ` +ENV ZBX_SOURCES=$ZBX_SOURCES MAJOR_VERSION=$MAJOR_VERSION ZBX_VERSION=$ZBX_VERSION GIT_BRANCH=${GIT_BRANCH:-$ZBX_VERSION} ` MONGODB_PLUGIN_SOURCES=$MONGODB_PLUGIN_SOURCES MONGODB_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ` - POSTGRESQL_PLUGIN_SOURCES=$POSTGRESQL_PLUGIN_SOURCES POSTGRESQL_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} + POSTGRESQL_PLUGIN_SOURCES=$POSTGRESQL_PLUGIN_SOURCES POSTGRESQL_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ` + MSSQL_PLUGIN_SOURCES=$MSSQL_PLUGIN_SOURCES MSSQL_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ` + EMBER_PLUS_PLUGIN_SOURCES=$EMBER_PLUS_PLUGIN_SOURCES EMBER_PLUS_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ` + 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 " ` @@ -32,25 +38,25 @@ 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""" ` GOFLAGS="""-buildvcs=false""" ` CGO_LDFLAGS="""-lcrypt32 -L$env:SystemDrive\vcpkg\installed\x64-mingw-static-release\lib""" ` @@ -59,34 +65,59 @@ RUN Set-Location -Path $env:SystemDrive\.; ` 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 ('Building Zabbix MongoDB plugin {0} version ...' -f $env:MONGODB_PLUGIN_VERSION); ` - git -c advice.detachedHead=false clone $env:MONGODB_PLUGIN_SOURCES --branch $env:MONGODB_PLUGIN_VERSION --depth 1 --single-branch $env:SystemDrive\zabbix_src\mongodb_plugin; ` - Set-Location -Path $env:SystemDrive\zabbix_src\mongodb_plugin; ` + git -c advice.detachedHead=false clone $env:MONGODB_PLUGIN_SOURCES --branch $env:MONGODB_PLUGIN_VERSION --depth 1 --single-branch $env:SystemDrive\mongodb-plugin-$env:MONGODB_PLUGIN_VERSION; ` + Set-Location -Path $env:SystemDrive\mongodb-plugin-$env:MONGODB_PLUGIN_VERSION; ` mingw32-make; ` ` Write-Host 'Verifying MongoDB plugin ("zabbix-agent2-plugin-mongodb.exe -V") ...'; ` - & $env:SystemDrive\zabbix_src\mongodb_plugin\zabbix-agent2-plugin-mongodb.exe -V; ` + & $env:SystemDrive\mongodb-plugin-$env:MONGODB_PLUGIN_VERSION\zabbix-agent2-plugin-mongodb.exe -V; ` ` - Copy-Item -Path $env:SystemDrive\zabbix_src\mongodb_plugin\zabbix-agent2-plugin-mongodb.exe $env:SystemDrive\zabbix_output\zabbix-agent2-plugin; ` - Copy-Item -Path $env:SystemDrive\zabbix_src\mongodb_plugin\mongodb.conf $env:SystemDrive\zabbix_output\conf\zabbix_agentd.d; ` + Copy-Item -Path $env:SystemDrive\mongodb-plugin-$env:MONGODB_PLUGIN_VERSION\zabbix-agent2-plugin-mongodb.exe $env:ZBX_OUTPUT_DIR\zabbix-agent2-plugin\mongodb.exe; ` + Copy-Item -Path $env:SystemDrive\mongodb-plugin-$env:MONGODB_PLUGIN_VERSION\mongodb.conf $env:ZBX_OUTPUT_DIR\conf\zabbix_agentd.d; ` mingw32-make -s clean; ` ` Write-Host ('Building Zabbix PostgreSQL plugin {0} version ...' -f $env:POSTGRESQL_PLUGIN_VERSION); ` - git -c advice.detachedHead=false clone $env:POSTGRESQL_PLUGIN_SOURCES --branch $env:POSTGRESQL_PLUGIN_VERSION --depth 1 --single-branch $env:SystemDrive\zabbix_src\postgresql_plugin; ` - Set-Location -Path $env:SystemDrive\zabbix_src\postgresql_plugin; ` + git -c advice.detachedHead=false clone $env:POSTGRESQL_PLUGIN_SOURCES --branch $env:POSTGRESQL_PLUGIN_VERSION --depth 1 --single-branch $env:SystemDrive\postgresql-plugin-$env:POSTGRESQL_PLUGIN_VERSION; ` + Set-Location -Path $env:SystemDrive\postgresql-plugin-$env:POSTGRESQL_PLUGIN_VERSION; ` mingw32-make; ` ` Write-Host 'Verifying build ("zabbix-agent2-plugin-postgresql.exe -V") ...'; ` - & $env:SystemDrive\zabbix_src\postgresql_plugin\zabbix-agent2-plugin-postgresql.exe -V; ` + & $env:SystemDrive\postgresql-plugin-$env:POSTGRESQL_PLUGIN_VERSION\zabbix-agent2-plugin-postgresql.exe -V; ` ` - Copy-Item -Path $env:SystemDrive\zabbix_src\postgresql_plugin\zabbix-agent2-plugin-postgresql.exe $env:SystemDrive\zabbix_output\zabbix-agent2-plugin; ` - Copy-Item -Path $env:SystemDrive\zabbix_src\postgresql_plugin\postgresql.conf $env:SystemDrive\zabbix_output\conf\zabbix_agentd.d; ` + Copy-Item -Path $env:SystemDrive\postgresql-plugin-$env:POSTGRESQL_PLUGIN_VERSION\zabbix-agent2-plugin-postgresql.exe $env:ZBX_OUTPUT_DIR\zabbix-agent2-plugin\postgresql.exe; ` + Copy-Item -Path $env:SystemDrive\postgresql-plugin-$env:POSTGRESQL_PLUGIN_VERSION\postgresql.conf $env:ZBX_OUTPUT_DIR\conf\zabbix_agentd.d; ` + mingw32-make -s clean; ` + ` + Write-Host ('Building Zabbix MSSQL plugin {0} version ...' -f $env:MSSQL_PLUGIN_VERSION); ` + git -c advice.detachedHead=false clone $env:MSSQL_PLUGIN_SOURCES --branch $env:MSSQL_PLUGIN_VERSION --depth 1 --single-branch $env:SystemDrive\mssql-plugin-$env:MSSQL_PLUGIN_VERSION; ` + Set-Location -Path $env:SystemDrive\mssql-plugin-$env:MSSQL_PLUGIN_VERSION; ` + mingw32-make; ` + ` + Write-Host 'Verifying MSSQL plugin ("zabbix-agent2-plugin-mssql.exe -V") ...'; ` + & $env:SystemDrive\mssql-plugin-$env:MSSQL_PLUGIN_VERSION\zabbix-agent2-plugin-mssql.exe -V; ` + ` + Copy-Item -Path $env:SystemDrive\mssql-plugin-$env:MSSQL_PLUGIN_VERSION\zabbix-agent2-plugin-mssql.exe $env:ZBX_OUTPUT_DIR\zabbix-agent2-plugin\mssql.exe; ` + Copy-Item -Path $env:SystemDrive\mssql-plugin-$env:MSSQL_PLUGIN_VERSION\mssql.conf $env:ZBX_OUTPUT_DIR\conf\zabbix_agentd.d; ` + mingw32-make -s clean; ` + ` + + Write-Host ('Building Zabbix Ember+ plugin {0} version ...' -f $env:EMBER_PLUS_PLUGIN_VERSION); ` + git -c advice.detachedHead=false clone $env:EMBER_PLUS_PLUGIN_SOURCES --branch $env:EMBER_PLUS_PLUGIN_VERSION --depth 1 --single-branch $env:SystemDrive\ember-plus-plugin-$env:EMBER_PLUS_PLUGIN_VERSION; ` + Set-Location -Path $env:SystemDrive\ember-plus-plugin-$env:EMBER_PLUS_PLUGIN_VERSION; ` + mingw32-make; ` + ` + Write-Host 'Verifying Ember+ plugin ("zabbix-agent2-plugin-ember-plus.exe -V") ...'; ` + & $env:SystemDrive\ember-plus-plugin-$env:EMBER_PLUS_PLUGIN_VERSION\zabbix-agent2-plugin-ember-plus.exe -V; ` + ` + Copy-Item -Path $env:SystemDrive\ember-plus-plugin-$env:EMBER_PLUS_PLUGIN_VERSION\zabbix-agent2-plugin-ember-plus.exe $env:ZBX_OUTPUT_DIR\zabbix-agent2-plugin\ember-plus.exe; ` + Copy-Item -Path $env:SystemDrive\ember-plus-plugin-$env:EMBER_PLUS_PLUGIN_VERSION\ember.conf $env:ZBX_OUTPUT_DIR\conf\zabbix_agentd.d; ` 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 ce92ed0e7..b575f22fc 100644 --- a/Dockerfiles/build-pgsql/alpine/Dockerfile +++ b/Dockerfiles/build-pgsql/alpine/Dockerfile @@ -20,16 +20,39 @@ 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/schema.sql ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/timescaledb.sql && \ + cp -R ${ZBX_SOURCES_DIR}/database/postgresql/timescaledb/option-patches/with-compression/*.sql ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/option-patches/with-compression/ && \ + cp -R ${ZBX_SOURCES_DIR}/database/postgresql/timescaledb/option-patches/without-compression/*.sql ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/option-patches/without-compression/ && \ 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 && \ - strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_web_service && \ + 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 && \ + strip ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_web_service && \ + 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 -R ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_agent2.d/ ${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/go/bin/zabbix_web_service ${ZBX_OUTPUT_DIR}/web_service/sbin/ && \ + cp ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_web_service.conf ${ZBX_OUTPUT_DIR}/web_service/conf/ && \ + 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 && \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb_plugin && \ - cd /tmp/mongodb_plugin && \ + mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ && \ + mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \ + cd /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \ make && \ - strip /tmp/mongodb_plugin/zabbix-agent2-plugin-mongodb && \ + strip /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb && \ + cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mongodb && \ + cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/mongodb.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql_plugin && \ - cd /tmp/postgresql_plugin && \ + git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \ + cd /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \ make && \ - strip /tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql + strip /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql && \ + cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/postgresql && \ + cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/postgresql.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + cd /tmp/ && \ + git -c advice.detachedHead=false clone ${MSSQL_PLUGIN_SOURCES} --branch ${MSSQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \ + cd /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \ + make && \ + strip /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql && \ + cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mssql && \ + cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/mssql.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + cd /tmp/ && \ + git -c advice.detachedHead=false clone ${EMBER_PLUS_PLUGIN_SOURCES} --branch ${EMBER_PLUS_PLUGIN_VERSION} --depth 1 --single-branch /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \ + cd /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \ + make && \ + strip /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus && \ + cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ember-plus && \ + cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/ember.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ diff --git a/Dockerfiles/build-pgsql/centos/Dockerfile b/Dockerfiles/build-pgsql/centos/Dockerfile index 9cee84f4b..f9b811e58 100644 --- a/Dockerfiles/build-pgsql/centos/Dockerfile +++ b/Dockerfiles/build-pgsql/centos/Dockerfile @@ -20,16 +20,39 @@ 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/schema.sql ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/timescaledb.sql && \ + cp -R ${ZBX_SOURCES_DIR}/database/postgresql/timescaledb/option-patches/with-compression/*.sql ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/option-patches/with-compression/ && \ + cp -R ${ZBX_SOURCES_DIR}/database/postgresql/timescaledb/option-patches/without-compression/*.sql ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/option-patches/without-compression/ && \ 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 && \ - strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_web_service && \ + 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 && \ + strip ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_web_service && \ + 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 -R ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_agent2.d/ ${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/go/bin/zabbix_web_service ${ZBX_OUTPUT_DIR}/web_service/sbin/ && \ + cp ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_web_service.conf ${ZBX_OUTPUT_DIR}/web_service/conf/ && \ + 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 && \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb_plugin && \ - cd /tmp/mongodb_plugin && \ + mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ && \ + mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \ + cd /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \ make && \ - strip /tmp/mongodb_plugin/zabbix-agent2-plugin-mongodb && \ + strip /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb && \ + cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mongodb && \ + cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/mongodb.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql_plugin && \ - cd /tmp/postgresql_plugin && \ + git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \ + cd /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \ make && \ - strip /tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql + strip /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql && \ + cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/postgresql && \ + cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/postgresql.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + cd /tmp/ && \ + git -c advice.detachedHead=false clone ${MSSQL_PLUGIN_SOURCES} --branch ${MSSQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \ + cd /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \ + make && \ + strip /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql && \ + cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mssql && \ + cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/mssql.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + cd /tmp/ && \ + git -c advice.detachedHead=false clone ${EMBER_PLUS_PLUGIN_SOURCES} --branch ${EMBER_PLUS_PLUGIN_VERSION} --depth 1 --single-branch /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \ + cd /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \ + make && \ + strip /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus && \ + cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ember-plus && \ + cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/ember.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ diff --git a/Dockerfiles/build-pgsql/ol/Dockerfile b/Dockerfiles/build-pgsql/ol/Dockerfile index 5d9402567..9cecb5f89 100644 --- a/Dockerfiles/build-pgsql/ol/Dockerfile +++ b/Dockerfiles/build-pgsql/ol/Dockerfile @@ -20,16 +20,39 @@ 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/schema.sql ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/timescaledb.sql && \ + cp -R ${ZBX_SOURCES_DIR}/database/postgresql/timescaledb/option-patches/with-compression/*.sql ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/option-patches/with-compression/ && \ + cp -R ${ZBX_SOURCES_DIR}/database/postgresql/timescaledb/option-patches/without-compression/*.sql ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/option-patches/without-compression/ && \ 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 && \ - strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_web_service && \ + 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 && \ + strip ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_web_service && \ + 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 -R ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_agent2.d/ ${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/go/bin/zabbix_web_service ${ZBX_OUTPUT_DIR}/web_service/sbin/ && \ + cp ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_web_service.conf ${ZBX_OUTPUT_DIR}/web_service/conf/ && \ + 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 && \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb_plugin && \ - cd /tmp/mongodb_plugin && \ + mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ && \ + mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \ + cd /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \ make && \ - strip /tmp/mongodb_plugin/zabbix-agent2-plugin-mongodb && \ + strip /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb && \ + cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mongodb && \ + cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/mongodb.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql_plugin && \ - cd /tmp/postgresql_plugin && \ + git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \ + cd /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \ make && \ - strip /tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql + strip /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql && \ + cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/postgresql && \ + cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/postgresql.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + cd /tmp/ && \ + git -c advice.detachedHead=false clone ${MSSQL_PLUGIN_SOURCES} --branch ${MSSQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \ + cd /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \ + make && \ + strip /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql && \ + cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mssql && \ + cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/mssql.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + cd /tmp/ && \ + git -c advice.detachedHead=false clone ${EMBER_PLUS_PLUGIN_SOURCES} --branch ${EMBER_PLUS_PLUGIN_VERSION} --depth 1 --single-branch /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \ + cd /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \ + make && \ + strip /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus && \ + cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ember-plus && \ + cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/ember.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ diff --git a/Dockerfiles/build-pgsql/rhel/Dockerfile b/Dockerfiles/build-pgsql/rhel/Dockerfile index cb27e2bb0..a28d64d41 100644 --- a/Dockerfiles/build-pgsql/rhel/Dockerfile +++ b/Dockerfiles/build-pgsql/rhel/Dockerfile @@ -31,16 +31,39 @@ LABEL description="Zabbix build base for PostgreSQL based images" \ org.label-schema.vcs-ref="${VCS_REF}" \ org.label-schema.vendor="Zabbix SIA" -ENV MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git MONGODB_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} \ - POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git POSTGRESQL_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} +ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_VERSION}-output \ + DB_TYPE=postgresql \ + MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git MONGODB_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} \ + POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git POSTGRESQL_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} \ + MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git MSSQL_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} \ + EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} RUN --mount=type=cache,target=/root/.cache/go-build/ \ --mount=type=cache,target=/root/go/ \ --mount=type=bind,source=conf/chromedp_no_sandbox.patch,target=/tmp/chromedp_no_sandbox.patch \ 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}/proxy/database/${DB_TYPE}/ && \ + mkdir -p ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/option-patches/with-compression/ && \ + mkdir -p ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/option-patches/without-compression/ && \ + 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}/web_service/sbin/ && \ + mkdir -p ${ZBX_OUTPUT_DIR}/web_service/conf/ && \ + 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} && \ patch -p1 < /tmp/chromedp_no_sandbox.patch && \ zabbix_revision=`git rev-parse --short HEAD` && \ sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \ @@ -69,44 +92,82 @@ 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/schema.sql ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/timescaledb.sql && \ + cp -R ${ZBX_SOURCES_DIR}/database/postgresql/timescaledb/option-patches/with-compression/*.sql ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/option-patches/with-compression/ && \ + cp -R ${ZBX_SOURCES_DIR}/database/postgresql/timescaledb/option-patches/without-compression/*.sql ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/option-patches/without-compression/ && \ 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 && \ - strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_web_service && \ + 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 && \ + strip ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_web_service && \ + 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 -R ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_agent2.d/ ${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/go/bin/zabbix_web_service ${ZBX_OUTPUT_DIR}/web_service/sbin/ && \ + cp ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_web_service.conf ${ZBX_OUTPUT_DIR}/web_service/conf/ && \ + 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 && \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb_plugin && \ - cd /tmp/mongodb_plugin && \ + mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ && \ + mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \ + cd /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \ make && \ - strip /tmp/mongodb_plugin/zabbix-agent2-plugin-mongodb && \ + strip /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb && \ + cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mongodb && \ + cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/mongodb.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql_plugin && \ - cd /tmp/postgresql_plugin && \ + git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \ + cd /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \ make && \ - strip /tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql + strip /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql && \ + cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/postgresql && \ + cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/postgresql.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + cd /tmp/ && \ + git -c advice.detachedHead=false clone ${MSSQL_PLUGIN_SOURCES} --branch ${MSSQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \ + cd /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \ + make && \ + strip /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql && \ + cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mssql && \ + cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/mssql.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + cd /tmp/ && \ + git -c advice.detachedHead=false clone ${EMBER_PLUS_PLUGIN_SOURCES} --branch ${EMBER_PLUS_PLUGIN_VERSION} --depth 1 --single-branch /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \ + cd /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \ + make && \ + strip /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus && \ + cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ember-plus && \ + cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/ember.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ diff --git a/Dockerfiles/build-pgsql/ubuntu/Dockerfile b/Dockerfiles/build-pgsql/ubuntu/Dockerfile index 03b61e096..39b6e5423 100644 --- a/Dockerfiles/build-pgsql/ubuntu/Dockerfile +++ b/Dockerfiles/build-pgsql/ubuntu/Dockerfile @@ -20,16 +20,39 @@ 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/schema.sql ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/timescaledb.sql && \ + cp -R ${ZBX_SOURCES_DIR}/database/postgresql/timescaledb/option-patches/with-compression/*.sql ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/option-patches/with-compression/ && \ + cp -R ${ZBX_SOURCES_DIR}/database/postgresql/timescaledb/option-patches/without-compression/*.sql ${ZBX_OUTPUT_DIR}/server/database/${DB_TYPE}/option-patches/without-compression/ && \ 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 && \ - strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_web_service && \ + 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 && \ + strip ${ZBX_SOURCES_DIR}/src/go/bin/zabbix_web_service && \ + 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 -R ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_agent2.d/ ${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/go/bin/zabbix_web_service ${ZBX_OUTPUT_DIR}/web_service/sbin/ && \ + cp ${ZBX_SOURCES_DIR}/src/go/conf/zabbix_web_service.conf ${ZBX_OUTPUT_DIR}/web_service/conf/ && \ + 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 && \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb_plugin && \ - cd /tmp/mongodb_plugin && \ + mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ && \ + mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \ + cd /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \ make && \ - strip /tmp/mongodb_plugin/zabbix-agent2-plugin-mongodb && \ + strip /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb && \ + cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mongodb && \ + cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/mongodb.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql_plugin && \ - cd /tmp/postgresql_plugin && \ + git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \ + cd /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \ make && \ - strip /tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql + strip /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql && \ + cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/postgresql && \ + cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/postgresql.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + cd /tmp/ && \ + git -c advice.detachedHead=false clone ${MSSQL_PLUGIN_SOURCES} --branch ${MSSQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \ + cd /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \ + make && \ + strip /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql && \ + cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mssql && \ + cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/mssql.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ + cd /tmp/ && \ + git -c advice.detachedHead=false clone ${EMBER_PLUS_PLUGIN_SOURCES} --branch ${EMBER_PLUS_PLUGIN_VERSION} --depth 1 --single-branch /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \ + cd /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \ + make && \ + strip /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus && \ + cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ember-plus && \ + cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/ember.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ diff --git a/Dockerfiles/build-sqlite3/alpine/Dockerfile b/Dockerfiles/build-sqlite3/alpine/Dockerfile index 5f96ce34c..6e9d8e8a1 100644 --- a/Dockerfiles/build-sqlite3/alpine/Dockerfile +++ b/Dockerfiles/build-sqlite3/alpine/Dockerfile @@ -20,15 +20,30 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov