Compare commits

..

No commits in common. "7.4" and "fix/DEVOPS-46/empty-db-socket" have entirely different histories.

306 changed files with 2523 additions and 3656 deletions

20
.env
View File

@ -1,10 +1,10 @@
# Zabbix images # Zabbix images
ZABBIX_ALPINE_IMAGE_TAG=alpine-7.4 ZABBIX_ALPINE_IMAGE_TAG=alpine
ZABBIX_CENTOS_IMAGE_TAG=centos-7.4 ZABBIX_CENTOS_IMAGE_TAG=centos
ZABBIX_OL_IMAGE_TAG=ol-7.4 ZABBIX_OL_IMAGE_TAG=ol
ZABBIX_UBUNTU_IMAGE_TAG=ubuntu-7.4 ZABBIX_UBUNTU_IMAGE_TAG=ubuntu
ZABBIX_RHEL_IMAGE_TAG=rhel-7.4 ZABBIX_RHEL_IMAGE_TAG=rhel
ZABBIX_IMAGE_TAG_POSTFIX=-latest ZABBIX_IMAGE_TAG_POSTFIX=-trunk
ZABBIX_LOCAL_IMAGE_TAG_POSTFIX=-local ZABBIX_LOCAL_IMAGE_TAG_POSTFIX=-local
ZABBIX_SERVER_MYSQL_IMAGE=zabbix/zabbix-server-mysql ZABBIX_SERVER_MYSQL_IMAGE=zabbix/zabbix-server-mysql
@ -78,11 +78,11 @@ ENV_VARS_DIRECTORY=./env_vars
RESTART_POLICY=unless-stopped RESTART_POLICY=unless-stopped
# Cache base images # Cache base images
ALPINE_BASE_IMAGE=alpine:3.23 ALPINE_BASE_IMAGE=alpine:3.21
CENTOS_BASE_IMAGE=quay.io/centos/centos:stream10-minimal CENTOS_BASE_IMAGE=quay.io/centos/centos:stream9-minimal
OL_BASE_IMAGE=container-registry.oracle.com/os/oraclelinux:10-slim OL_BASE_IMAGE=oraclelinux:9-slim
UBUNTU_BASE_IMAGE=ubuntu:noble UBUNTU_BASE_IMAGE=ubuntu:noble
RHEL_BASE_IMAGE=registry.access.redhat.com/ubi10/ubi-minimal:10.1 RHEL_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:9.5
# Base images # Base images
BUILD_BASE_IMAGE=zabbix-build-base BUILD_BASE_IMAGE=zabbix-build-base

View File

@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Harden Runner - name: Harden Runner
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with: with:
disable-sudo: true disable-sudo: true
egress-policy: block egress-policy: block
@ -27,6 +27,6 @@ jobs:
github.com:443 github.com:443
- name: 'Checkout Repository' - name: 'Checkout Repository'
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: 'Dependency Review' - name: 'Dependency Review'
uses: actions/dependency-review-action@3c4e3dcb1aa7874d2c16be7d79418e9b7efd6261 # v4.8.2 uses: actions/dependency-review-action@72eb03d02c7872a771aacd928f3123ac62ad6d3a # v4.3.3

View File

@ -48,7 +48,7 @@ jobs:
- web-service - web-service
steps: steps:
- name: Block egress traffic - name: Block egress traffic
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with: with:
disable-sudo: true disable-sudo: true
egress-policy: block egress-policy: block
@ -57,12 +57,12 @@ jobs:
hub.docker.com:443 hub.docker.com:443
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
fetch-depth: 1 fetch-depth: 1
- name: Update DockerHub repo description (zabbix-${{ matrix.component }}) - name: Update DockerHub repo description (zabbix-${{ matrix.component }})
uses: peter-evans/dockerhub-description@1b9a80c056b620d92cedb9d9b5a223409c68ddfa # v5.0.0 uses: peter-evans/dockerhub-description@e98e4d1628a5f3be2be7c231e50981aee98723ae # v4.0.0
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}

View File

@ -64,7 +64,7 @@ jobs:
sha_short: ${{ steps.branch_info.outputs.sha_short }} sha_short: ${{ steps.branch_info.outputs.sha_short }}
steps: steps:
- name: Block egress traffic - name: Block egress traffic
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with: with:
disable-sudo: true disable-sudo: true
egress-policy: block egress-policy: block
@ -72,10 +72,9 @@ jobs:
api.github.com:443 api.github.com:443
github.com:443 github.com:443
objects.githubusercontent.com:443 objects.githubusercontent.com:443
release-assets.githubusercontent.com:443
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
ref: ${{ env.TRUNK_ONLY_EVENT == 'true' && env.TRUNK_GIT_BRANCH || '' }} ref: ${{ env.TRUNK_ONLY_EVENT == 'true' && env.TRUNK_GIT_BRANCH || '' }}
fetch-depth: 1 fetch-depth: 1
@ -176,13 +175,12 @@ jobs:
attestations: write attestations: write
steps: steps:
- name: Block egress traffic - name: Block egress traffic
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with: with:
disable-sudo: true disable-sudo: true
egress-policy: audit egress-policy: audit
allowed-endpoints: > allowed-endpoints: >
api.github.com:443 api.github.com:443
release-assets.githubusercontent.com:443
archive.ubuntu.com:80 archive.ubuntu.com:80
atl.mirrors.knownhost.com:443 atl.mirrors.knownhost.com:443
atl.mirrors.knownhost.com:80 atl.mirrors.knownhost.com:80
@ -268,26 +266,27 @@ jobs:
ziply.mm.fcix.net:443 ziply.mm.fcix.net:443
pkg-containers.githubusercontent.com:443 pkg-containers.githubusercontent.com:443
raw.githubusercontent.com:443 raw.githubusercontent.com:443
timestamp.sigstore.dev:443
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
ref: ${{ env.TRUNK_ONLY_EVENT == 'true' && env.TRUNK_GIT_BRANCH || '' }} ref: ${{ env.TRUNK_ONLY_EVENT == 'true' && env.TRUNK_GIT_BRANCH || '' }}
fetch-depth: 1 fetch-depth: 1
- name: Install cosign - name: Install cosign
if: ${{ env.AUTO_PUSH_IMAGES == 'true' }} if: ${{ env.AUTO_PUSH_IMAGES == 'true' }}
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a
with:
cosign-release: 'v2.4.0'
- name: Check cosign version - name: Check cosign version
if: ${{ env.AUTO_PUSH_IMAGES == 'true' }} if: ${{ env.AUTO_PUSH_IMAGES == 'true' }}
run: cosign version run: cosign version
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0 uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
with: with:
image: tonistiigi/binfmt:qemu-v10.0.4 image: tonistiigi/binfmt:qemu-v8.1.5
platforms: all platforms: all
- name: Set up Docker Buildx - name: Set up Docker Buildx
@ -312,7 +311,7 @@ jobs:
- name: Generate tags - name: Generate tags
id: meta id: meta
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0 uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
with: with:
images: | images: |
${{ format('{0}/{1}/{2}{3}', env.DOCKER_REGISTRY_TEST, env.DOCKER_REPOSITORY_TEST, env.IMAGES_PREFIX, env.BASE_BUILD_NAME ) }},enable=${{ env.AUTO_PUSH_IMAGES != 'true' }} ${{ format('{0}/{1}/{2}{3}', env.DOCKER_REGISTRY_TEST, env.DOCKER_REPOSITORY_TEST, env.IMAGES_PREFIX, env.BASE_BUILD_NAME ) }},enable=${{ env.AUTO_PUSH_IMAGES != 'true' }}
@ -363,14 +362,14 @@ jobs:
- name: Login to DockerHub - name: Login to DockerHub
if: ${{ env.AUTO_PUSH_IMAGES == 'true' }} if: ${{ env.AUTO_PUSH_IMAGES == 'true' }}
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to ${{ env.DOCKER_REGISTRY_TEST }} - name: Login to ${{ env.DOCKER_REGISTRY_TEST }}
if: ${{ env.AUTO_PUSH_IMAGES != 'true' }} if: ${{ env.AUTO_PUSH_IMAGES != 'true' }}
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with: with:
registry: ${{ env.DOCKER_REGISTRY_TEST }} registry: ${{ env.DOCKER_REGISTRY_TEST }}
username: ${{ github.actor }} username: ${{ github.actor }}
@ -392,12 +391,10 @@ jobs:
org.opencontainers.image.created=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }} org.opencontainers.image.created=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
- name: Scan for vulnerabilities - name: Scan for vulnerabilities
if: ${{ matrix.os != 'centos' }}
uses: crazy-max/ghaction-container-scan@v3 uses: crazy-max/ghaction-container-scan@v3
with: with:
image: ${{ fromJSON(steps.meta.outputs.json).tags[0] }} image: ${{ fromJSON(steps.meta.outputs.json).tags[0] }}
annotations: true annotations: true
dockerfile: ${{ format('{0}/{1}/{2}/Dockerfile', env.DOCKERFILES_DIRECTORY, env.BASE_BUILD_NAME, matrix.os) }}
- name: Sign the images with GitHub OIDC Token - name: Sign the images with GitHub OIDC Token
if: ${{ env.AUTO_PUSH_IMAGES == 'true' }} if: ${{ env.AUTO_PUSH_IMAGES == 'true' }}
@ -422,7 +419,7 @@ jobs:
- name: Attest images - name: Attest images
if: ${{ env.AUTO_PUSH_IMAGES == 'true' }} if: ${{ env.AUTO_PUSH_IMAGES == 'true' }}
id: attest id: attest
uses: actions/attest-build-provenance@v3 uses: actions/attest-build-provenance@v2
with: with:
subject-name: ${{ format('{0}/{1}/{2}{3}', env.DOCKER_REGISTRY, env.DOCKER_REPOSITORY, env.IMAGES_PREFIX, env.BASE_BUILD_NAME ) }} subject-name: ${{ format('{0}/{1}/{2}{3}', env.DOCKER_REGISTRY, env.DOCKER_REPOSITORY, env.IMAGES_PREFIX, env.BASE_BUILD_NAME ) }}
subject-digest: ${{ steps.docker_build.outputs.digest }} subject-digest: ${{ steps.docker_build.outputs.digest }}
@ -443,13 +440,13 @@ jobs:
echo "${METADATA}" > "$CACHE_FILE_NAME" echo "${METADATA}" > "$CACHE_FILE_NAME"
- name: Cache image metadata - name: Cache image metadata
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with: with:
path: ${{ env.BASE_CACHE_FILE_NAME }} path: ${{ env.BASE_CACHE_FILE_NAME }}
key: ${{ env.BASE_BUILD_NAME }}-${{ matrix.os }}-${{ github.run_id }} key: ${{ env.BASE_BUILD_NAME }}-${{ matrix.os }}-${{ github.run_id }}
build_base_database: build_base_database:
timeout-minutes: 1240 timeout-minutes: 180
needs: [ "build_base", "init_build"] needs: [ "build_base", "init_build"]
name: Build ${{ matrix.build }} base on ${{ matrix.os }} name: Build ${{ matrix.build }} base on ${{ matrix.os }}
strategy: strategy:
@ -465,13 +462,12 @@ jobs:
attestations: write attestations: write
steps: steps:
- name: Block egress traffic - name: Block egress traffic
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with: with:
disable-sudo: true disable-sudo: true
egress-policy: block egress-policy: block
allowed-endpoints: > allowed-endpoints: >
api.github.com:443 api.github.com:443
release-assets.githubusercontent.com:443
auth.docker.io:443 auth.docker.io:443
git.zabbix.com:443 git.zabbix.com:443
github.com:443 github.com:443
@ -479,9 +475,7 @@ jobs:
go.mongodb.org:443 go.mongodb.org:443
golang.org:443 golang.org:443
google.golang.org:443 google.golang.org:443
sum.golang.org:443
golang.zabbix.com:443 golang.zabbix.com:443
sum.golang.org:443
gopkg.in:443 gopkg.in:443
ghcr.io:443 ghcr.io:443
index.docker.io:443 index.docker.io:443
@ -497,26 +491,27 @@ jobs:
rekor.sigstore.dev:443 rekor.sigstore.dev:443
pkg-containers.githubusercontent.com:443 pkg-containers.githubusercontent.com:443
raw.githubusercontent.com:443 raw.githubusercontent.com:443
timestamp.sigstore.dev:443
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
ref: ${{ env.TRUNK_ONLY_EVENT == 'true' && env.TRUNK_GIT_BRANCH || '' }} ref: ${{ env.TRUNK_ONLY_EVENT == 'true' && env.TRUNK_GIT_BRANCH || '' }}
fetch-depth: 1 fetch-depth: 1
- name: Install cosign - name: Install cosign
if: ${{ env.AUTO_PUSH_IMAGES == 'true' }} if: ${{ env.AUTO_PUSH_IMAGES == 'true' }}
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a
with:
cosign-release: 'v2.4.0'
- name: Check cosign version - name: Check cosign version
if: ${{ env.AUTO_PUSH_IMAGES == 'true' }} if: ${{ env.AUTO_PUSH_IMAGES == 'true' }}
run: cosign version run: cosign version
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0 uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
with: with:
image: tonistiigi/binfmt:qemu-v10.0.4 image: tonistiigi/binfmt:qemu-v8.1.5
platforms: all platforms: all
- name: Set up Docker Buildx - name: Set up Docker Buildx
@ -541,7 +536,7 @@ jobs:
- name: Generate tags - name: Generate tags
id: meta id: meta
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0 uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
with: with:
images: | images: |
${{ format('{0}/{1}/{2}{3}', env.DOCKER_REGISTRY_TEST, env.DOCKER_REPOSITORY_TEST, env.IMAGES_PREFIX, matrix.build ) }},enable=${{ env.AUTO_PUSH_IMAGES != 'true' }} ${{ format('{0}/{1}/{2}{3}', env.DOCKER_REGISTRY_TEST, env.DOCKER_REPOSITORY_TEST, env.IMAGES_PREFIX, matrix.build ) }},enable=${{ env.AUTO_PUSH_IMAGES != 'true' }}
@ -559,7 +554,7 @@ jobs:
latest=${{ (matrix.os == 'alpine') && (!contains(fromJSON('["workflow_dispatch"]'), github.event_name)) && ( needs.init_build.outputs.is_default_branch == 'true' ) }} latest=${{ (matrix.os == 'alpine') && (!contains(fromJSON('["workflow_dispatch"]'), github.event_name)) && ( needs.init_build.outputs.is_default_branch == 'true' ) }}
- name: Download metadata of ${{ env.BASE_BUILD_NAME }}:${{ matrix.os }} - name: Download metadata of ${{ env.BASE_BUILD_NAME }}:${{ matrix.os }}
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with: with:
path: ${{ env.BASE_CACHE_FILE_NAME }} path: ${{ env.BASE_CACHE_FILE_NAME }}
key: ${{ env.BASE_BUILD_NAME }}-${{ matrix.os }}-${{ github.run_id }} key: ${{ env.BASE_BUILD_NAME }}-${{ matrix.os }}-${{ github.run_id }}
@ -635,14 +630,14 @@ jobs:
- name: Login to DockerHub - name: Login to DockerHub
if: ${{ env.AUTO_PUSH_IMAGES == 'true' }} if: ${{ env.AUTO_PUSH_IMAGES == 'true' }}
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to ${{ env.DOCKER_REGISTRY_TEST }} - name: Login to ${{ env.DOCKER_REGISTRY_TEST }}
if: ${{ env.AUTO_PUSH_IMAGES != 'true' }} if: ${{ env.AUTO_PUSH_IMAGES != 'true' }}
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with: with:
registry: ${{ env.DOCKER_REGISTRY_TEST }} registry: ${{ env.DOCKER_REGISTRY_TEST }}
username: ${{ github.actor }} username: ${{ github.actor }}
@ -690,7 +685,7 @@ jobs:
- name: Attest images - name: Attest images
if: ${{ env.AUTO_PUSH_IMAGES == 'true' }} if: ${{ env.AUTO_PUSH_IMAGES == 'true' }}
id: attest id: attest
uses: actions/attest-build-provenance@v3 uses: actions/attest-build-provenance@v2
with: with:
subject-name: ${{ format('{0}/{1}/{2}{3}', env.DOCKER_REGISTRY, env.DOCKER_REPOSITORY, env.IMAGES_PREFIX, matrix.build ) }} subject-name: ${{ format('{0}/{1}/{2}{3}', env.DOCKER_REGISTRY, env.DOCKER_REPOSITORY, env.IMAGES_PREFIX, matrix.build ) }}
subject-digest: ${{ steps.docker_build.outputs.digest }} subject-digest: ${{ steps.docker_build.outputs.digest }}
@ -711,7 +706,7 @@ jobs:
echo "${METADATA}" > "$CACHE_FILE_NAME" echo "${METADATA}" > "$CACHE_FILE_NAME"
- name: Cache image metadata - name: Cache image metadata
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with: with:
path: ${{ env.BUILD_CACHE_FILE_NAME }} path: ${{ env.BUILD_CACHE_FILE_NAME }}
key: ${{ matrix.build }}-${{ matrix.os }}-${{ github.run_id }} key: ${{ matrix.build }}-${{ matrix.os }}-${{ github.run_id }}
@ -734,14 +729,12 @@ jobs:
attestations: write attestations: write
steps: steps:
- name: Block egress traffic - name: Block egress traffic
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with: with:
disable-sudo: true disable-sudo: true
egress-policy: block egress-policy: block
allowed-endpoints: > allowed-endpoints: >
api.github.com:443 api.github.com:443
release-assets.githubusercontent.com:443
apt.postgresql.org:80
auth.docker.io:443 auth.docker.io:443
dl-cdn.alpinelinux.org:443 dl-cdn.alpinelinux.org:443
github.com:443 github.com:443
@ -859,26 +852,27 @@ jobs:
rekor.sigstore.dev:443 rekor.sigstore.dev:443
pkg-containers.githubusercontent.com:443 pkg-containers.githubusercontent.com:443
raw.githubusercontent.com:443 raw.githubusercontent.com:443
timestamp.sigstore.dev:443
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
ref: ${{ env.TRUNK_ONLY_EVENT == 'true' && env.TRUNK_GIT_BRANCH || '' }} ref: ${{ env.TRUNK_ONLY_EVENT == 'true' && env.TRUNK_GIT_BRANCH || '' }}
fetch-depth: 1 fetch-depth: 1
- name: Install cosign - name: Install cosign
if: ${{ env.AUTO_PUSH_IMAGES == 'true' }} if: ${{ env.AUTO_PUSH_IMAGES == 'true' }}
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a
with:
cosign-release: 'v2.4.0'
- name: Check cosign version - name: Check cosign version
if: ${{ env.AUTO_PUSH_IMAGES == 'true' }} if: ${{ env.AUTO_PUSH_IMAGES == 'true' }}
run: cosign version run: cosign version
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0 uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
with: with:
image: tonistiigi/binfmt:qemu-v10.0.4 image: tonistiigi/binfmt:qemu-v8.1.5
platforms: all platforms: all
- name: Set up Docker Buildx - name: Set up Docker Buildx
@ -935,7 +929,7 @@ jobs:
- name: Generate tags - name: Generate tags
id: meta id: meta
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0 uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
with: with:
images: | images: |
${{ format('{0}/{1}/{2}{3}', env.DOCKER_REGISTRY_TEST, env.DOCKER_REPOSITORY_TEST, env.IMAGES_PREFIX, matrix.build ) }},enable=${{ env.AUTO_PUSH_IMAGES != 'true' }} ${{ format('{0}/{1}/{2}{3}', env.DOCKER_REGISTRY_TEST, env.DOCKER_REPOSITORY_TEST, env.IMAGES_PREFIX, matrix.build ) }},enable=${{ env.AUTO_PUSH_IMAGES != 'true' }}
@ -953,7 +947,7 @@ jobs:
latest=${{ (matrix.os == 'alpine') && (!contains(fromJSON('["workflow_dispatch"]'), github.event_name)) && ( needs.init_build.outputs.is_default_branch == 'true' ) }} latest=${{ (matrix.os == 'alpine') && (!contains(fromJSON('["workflow_dispatch"]'), github.event_name)) && ( needs.init_build.outputs.is_default_branch == 'true' ) }}
- name: Download metadata of ${{ steps.build_base_image.outputs.build_base }}:${{ matrix.os }} - name: Download metadata of ${{ steps.build_base_image.outputs.build_base }}:${{ matrix.os }}
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
if: ${{ matrix.build != 'snmptraps' }} if: ${{ matrix.build != 'snmptraps' }}
with: with:
path: ${{ env.BUILD_CACHE_FILE_NAME }} path: ${{ env.BUILD_CACHE_FILE_NAME }}
@ -1017,7 +1011,7 @@ jobs:
- name: Login to DockerHub - name: Login to DockerHub
if: ${{ env.AUTO_PUSH_IMAGES == 'true' }} if: ${{ env.AUTO_PUSH_IMAGES == 'true' }}
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
@ -1061,7 +1055,7 @@ jobs:
- name: Attest images - name: Attest images
if: ${{ env.AUTO_PUSH_IMAGES == 'true' }} if: ${{ env.AUTO_PUSH_IMAGES == 'true' }}
id: attest id: attest
uses: actions/attest-build-provenance@v3 uses: actions/attest-build-provenance@v2
with: with:
subject-name: ${{ format('{0}/{1}/{2}{3}', env.DOCKER_REGISTRY, env.DOCKER_REPOSITORY, env.IMAGES_PREFIX, matrix.build ) }} subject-name: ${{ format('{0}/{1}/{2}{3}', env.DOCKER_REGISTRY, env.DOCKER_REPOSITORY, env.IMAGES_PREFIX, matrix.build ) }}
subject-digest: ${{ steps.docker_build.outputs.digest }} subject-digest: ${{ steps.docker_build.outputs.digest }}

View File

@ -72,7 +72,7 @@ jobs:
secret_prefix: ${{ steps.branch_info.outputs.secret_prefix }} secret_prefix: ${{ steps.branch_info.outputs.secret_prefix }}
steps: steps:
- name: Block egress traffic - name: Block egress traffic
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with: with:
disable-sudo: true disable-sudo: true
egress-policy: block egress-policy: block
@ -80,10 +80,9 @@ jobs:
api.github.com:443 api.github.com:443
github.com:443 github.com:443
objects.githubusercontent.com:443 objects.githubusercontent.com:443
release-assets.githubusercontent.com:443
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
fetch-depth: 1 fetch-depth: 1
sparse-checkout: ${{ env.MATRIX_FILE }} sparse-checkout: ${{ env.MATRIX_FILE }}
@ -214,13 +213,13 @@ jobs:
contents: read contents: read
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
fetch-depth: 1 fetch-depth: 1
- name: Install cosign - name: Install cosign
if: ${{ env.AUTO_PUSH_IMAGES == 'true' }} if: ${{ env.AUTO_PUSH_IMAGES == 'true' }}
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a
with: with:
cosign-release: 'v2.4.0' cosign-release: 'v2.4.0'
@ -237,7 +236,7 @@ jobs:
- name: Generate tags - name: Generate tags
id: meta id: meta
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0 uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
with: with:
images: ${{ env.IMAGES_PREFIX }}${{ matrix.build }} images: ${{ env.IMAGES_PREFIX }}${{ matrix.build }}
tags: | tags: |
@ -282,7 +281,7 @@ jobs:
echo "image_tag=${IMAGE_TAG}" >> $GITHUB_OUTPUT echo "image_tag=${IMAGE_TAG}" >> $GITHUB_OUTPUT
- name: Cache image metadata - name: Cache image metadata
uses: actions/cache/save@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 uses: actions/cache/save@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with: with:
path: | path: |
${{ env.BASE_BUILD_NAME }}_${{ matrix.arch }}_tag_id ${{ env.BASE_BUILD_NAME }}_${{ matrix.arch }}_tag_id
@ -345,7 +344,7 @@ jobs:
contents: read contents: read
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
fetch-depth: 1 fetch-depth: 1
@ -357,7 +356,7 @@ jobs:
echo "arch=${ARCH,,}" >> $GITHUB_OUTPUT echo "arch=${ARCH,,}" >> $GITHUB_OUTPUT
- name: Download metadata of ${{ env.BASE_BUILD_NAME }}:${{ matrix.arch }} - name: Download metadata of ${{ env.BASE_BUILD_NAME }}:${{ matrix.arch }}
uses: actions/cache/restore@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 uses: actions/cache/restore@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with: with:
path: | path: |
${{ env.BASE_BUILD_NAME }}_${{ matrix.arch }}_tag_id ${{ env.BASE_BUILD_NAME }}_${{ matrix.arch }}_tag_id
@ -395,7 +394,7 @@ jobs:
- name: Generate tags - name: Generate tags
id: meta id: meta
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0 uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
with: with:
images: ${{ env.IMAGES_PREFIX }}${{ matrix.build }} images: ${{ env.IMAGES_PREFIX }}${{ matrix.build }}
tags: | tags: |
@ -410,7 +409,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
containerfiles: | containerfiles: |
${{ env.DOCKERFILES_DIRECTORY }}/${{ matrix.build }}/rhel/Dockerfile ${{ env.DOCKERFILES_DIRECTORY }}/${{ matrix.build }}/rhel/Dockerfile
build-args: BUILD_BASE_IMAGE=localhost/${{ steps.base_build.outputs.base_build_image }} build-args: BUILD_BASE_IMAGE=${{ steps.base_build.outputs.base_build_image }}
extra-args: | extra-args: |
--iidfile=${{ github.workspace }}/iidfile --iidfile=${{ github.workspace }}/iidfile
--build-context sources=./sources/ --build-context sources=./sources/
@ -442,7 +441,7 @@ jobs:
echo "image_tag=${IMAGE_TAG}" >> $GITHUB_OUTPUT echo "image_tag=${IMAGE_TAG}" >> $GITHUB_OUTPUT
- name: Cache image metadata - name: Cache image metadata
uses: actions/cache/save@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 uses: actions/cache/save@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with: with:
path: | path: |
${{ matrix.build }}_${{ matrix.arch }}_tag_id ${{ matrix.build }}_${{ matrix.arch }}_tag_id
@ -505,7 +504,7 @@ jobs:
contents: read contents: read
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
fetch-depth: 1 fetch-depth: 1
@ -539,7 +538,7 @@ jobs:
- name: Download metadata of ${{ steps.build_base_image.outputs.build_base }}:${{ matrix.arch }} - name: Download metadata of ${{ steps.build_base_image.outputs.build_base }}:${{ matrix.arch }}
if: ${{ matrix.build != 'snmptraps' }} if: ${{ matrix.build != 'snmptraps' }}
uses: actions/cache/restore@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 uses: actions/cache/restore@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with: with:
path: | path: |
${{ steps.build_base_image.outputs.build_base }}_${{ matrix.arch }}_tag_id ${{ steps.build_base_image.outputs.build_base }}_${{ matrix.arch }}_tag_id
@ -584,7 +583,7 @@ jobs:
- name: Generate tags - name: Generate tags
id: meta id: meta
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0 uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
with: with:
images: ${{ env.REGISTRY }}/${{ env.REGISTRY_NAMESPACE }}/${{ secrets[format('{0}_{1}_PROJECT', needs.init_build.outputs.secret_prefix, steps.var_format.outputs.matrix_build)] || matrix.build }} images: ${{ env.REGISTRY }}/${{ env.REGISTRY_NAMESPACE }}/${{ secrets[format('{0}_{1}_PROJECT', needs.init_build.outputs.secret_prefix, steps.var_format.outputs.matrix_build)] || matrix.build }}
tags: | tags: |
@ -607,8 +606,9 @@ jobs:
containerfiles: | containerfiles: |
${{ env.DOCKERFILES_DIRECTORY }}/${{ matrix.build }}/rhel/Dockerfile ${{ env.DOCKERFILES_DIRECTORY }}/${{ matrix.build }}/rhel/Dockerfile
extra-args: | extra-args: |
--pull
--iidfile=${{ github.workspace }}/iidfile --iidfile=${{ github.workspace }}/iidfile
build-args: BUILD_BASE_IMAGE=localhost/${{ steps.base_build.outputs.base_build_image }} build-args: BUILD_BASE_IMAGE=${{ steps.base_build.outputs.base_build_image }}
- name: Log in to ${{ env.REGISTRY }} - name: Log in to ${{ env.REGISTRY }}
uses: redhat-actions/podman-login@9184318aae1ee5034fbfbacc0388acf12669171f # v1.6 uses: redhat-actions/podman-login@9184318aae1ee5034fbfbacc0388acf12669171f # v1.6
@ -650,7 +650,7 @@ jobs:
--env PFLT_LOGLEVEL=$PFLT_LOGLEVEL \ --env PFLT_LOGLEVEL=$PFLT_LOGLEVEL \
--env PFLT_ARTIFACTS=/artifacts \ --env PFLT_ARTIFACTS=/artifacts \
--env PFLT_LOGFILE=/artifacts/preflight.log \ --env PFLT_LOGFILE=/artifacts/preflight.log \
--env PFLT_CERTIFICATION_COMPONENT_ID=$PFLT_CERTIFICATION_PROJECT_ID \ --env PFLT_CERTIFICATION_PROJECT_ID=$PFLT_CERTIFICATION_PROJECT_ID \
--env PFLT_PYXIS_API_TOKEN=$PFLT_PYXIS_API_TOKEN \ --env PFLT_PYXIS_API_TOKEN=$PFLT_PYXIS_API_TOKEN \
--env PFLT_DOCKERCONFIG=/temp-authfile.json \ --env PFLT_DOCKERCONFIG=/temp-authfile.json \
-v $PFLT_ARTIFACTS:/artifacts \ -v $PFLT_ARTIFACTS:/artifacts \
@ -720,7 +720,7 @@ jobs:
permissions: {} permissions: {}
steps: steps:
- name: Download metadata of ${{ matrix.build }}:${{ matrix.arch }} - name: Download metadata of ${{ matrix.build }}:${{ matrix.arch }}
uses: actions/cache/restore@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 uses: actions/cache/restore@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with: with:
path: | path: |
${{ matrix.build }}_${{ matrix.arch }}_tag_id ${{ matrix.build }}_${{ matrix.arch }}_tag_id
@ -741,7 +741,7 @@ jobs:
echo "::endgroup::" echo "::endgroup::"
- name: Download metadata of ${{ env.BASE_BUILD_NAME }}:${{ matrix.arch }} - name: Download metadata of ${{ env.BASE_BUILD_NAME }}:${{ matrix.arch }}
uses: actions/cache/restore@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 uses: actions/cache/restore@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with: with:
path: | path: |
${{ env.BASE_BUILD_NAME }}_${{ matrix.arch }}_tag_id ${{ env.BASE_BUILD_NAME }}_${{ matrix.arch }}_tag_id

View File

@ -35,7 +35,8 @@ env:
IMAGES_PREFIX: "zabbix-" IMAGES_PREFIX: "zabbix-"
MSFT_BASE_BUILD_IMAGE: "mcr.microsoft.com/windows/servercore" MSFT_BASE_BUILD_IMAGE: "mcr.microsoft.com/windows/servercore"
OS_BASE_IMAGE_NAME: "mcr.microsoft.com/windows/nanoserver" PWSH_BASE_IMAGE_NAME: "mcr.microsoft.com/powershell"
PWSH_BASE_IMAGE_PREFIX: "lts-nanoserver-"
BASE_IMAGE_NAME: "build-base" BASE_IMAGE_NAME: "build-base"
BASE_BUILD_IMAGE_NAME: "build-mysql" BASE_BUILD_IMAGE_NAME: "build-mysql"
@ -60,16 +61,15 @@ jobs:
sha_short: ${{ steps.branch_info.outputs.sha_short }} sha_short: ${{ steps.branch_info.outputs.sha_short }}
steps: steps:
- name: Block egress traffic - name: Block egress traffic
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with: with:
disable-sudo: true disable-sudo: true
egress-policy: block egress-policy: block
allowed-endpoints: > allowed-endpoints: >
github.com:443 github.com:443
release-assets.githubusercontent.com:443
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
ref: ${{ env.TRUNK_ONLY_EVENT == 'true' && env.TRUNK_GIT_BRANCH || '' }} ref: ${{ env.TRUNK_ONLY_EVENT == 'true' && env.TRUNK_GIT_BRANCH || '' }}
fetch-depth: 1 fetch-depth: 1
@ -158,13 +158,13 @@ jobs:
component: ${{ fromJson(needs.init_build.outputs.components) }} component: ${{ fromJson(needs.init_build.outputs.components) }}
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
ref: ${{ env.TRUNK_ONLY_EVENT == 'true' && env.TRUNK_GIT_BRANCH || '' }} ref: ${{ env.TRUNK_ONLY_EVENT == 'true' && env.TRUNK_GIT_BRANCH || '' }}
fetch-depth: 1 fetch-depth: 1
- name: Install cosign - name: Install cosign
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a
with: with:
cosign-release: 'v2.4.0' cosign-release: 'v2.4.0'
@ -172,7 +172,7 @@ jobs:
run: cosign version run: cosign version
- name: Login to DockerHub - name: Login to DockerHub
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
@ -193,7 +193,7 @@ jobs:
- name: Generate tags - name: Generate tags
id: meta id: meta
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0 uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
with: with:
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGES_PREFIX }}${{ env.BASE_IMAGE_NAME }} images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGES_PREFIX }}${{ env.BASE_IMAGE_NAME }}
context: ${{ env.TRUNK_ONLY_EVENT == 'true' && 'git' || '' }} context: ${{ env.TRUNK_ONLY_EVENT == 'true' && 'git' || '' }}
@ -327,7 +327,7 @@ jobs:
$Env:DIGEST | Set-Content -Path $Env:CACHE_FILE_NAME $Env:DIGEST | Set-Content -Path $Env:CACHE_FILE_NAME
- name: Cache image digest - name: Cache image digest
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with: with:
path: ${{ env.BASE_IMAGE_NAME }}_${{ matrix.os }}_${{ matrix.component }} path: ${{ env.BASE_IMAGE_NAME }}_${{ matrix.os }}_${{ matrix.component }}
key: ${{ env.BASE_IMAGE_NAME }}-${{ matrix.os }}-${{ github.run_id }} key: ${{ env.BASE_IMAGE_NAME }}-${{ matrix.os }}-${{ github.run_id }}
@ -348,13 +348,13 @@ jobs:
component: ${{ fromJson(needs.init_build.outputs.components) }} component: ${{ fromJson(needs.init_build.outputs.components) }}
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
ref: ${{ env.TRUNK_ONLY_EVENT == 'true' && env.TRUNK_GIT_BRANCH || '' }} ref: ${{ env.TRUNK_ONLY_EVENT == 'true' && env.TRUNK_GIT_BRANCH || '' }}
fetch-depth: 1 fetch-depth: 1
- name: Install cosign - name: Install cosign
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a
with: with:
cosign-release: 'v2.4.0' cosign-release: 'v2.4.0'
@ -362,7 +362,7 @@ jobs:
run: cosign version run: cosign version
- name: Login to DockerHub - name: Login to DockerHub
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
@ -383,7 +383,7 @@ jobs:
- name: Generate tags - name: Generate tags
id: meta id: meta
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0 uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
with: with:
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGES_PREFIX }}${{ env.BASE_BUILD_IMAGE_NAME }} images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGES_PREFIX }}${{ env.BASE_BUILD_IMAGE_NAME }}
context: ${{ env.TRUNK_ONLY_EVENT == 'true' && 'git' || '' }} context: ${{ env.TRUNK_ONLY_EVENT == 'true' && 'git' || '' }}
@ -399,7 +399,7 @@ jobs:
latest=false latest=false
- name: Download SHA256 tag of ${{ env.BASE_IMAGE_NAME }}:${{ matrix.os }} - name: Download SHA256 tag of ${{ env.BASE_IMAGE_NAME }}:${{ matrix.os }}
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with: with:
path: ${{ env.BASE_IMAGE_NAME }}_${{ matrix.os }}_${{ matrix.component }} path: ${{ env.BASE_IMAGE_NAME }}_${{ matrix.os }}_${{ matrix.component }}
key: ${{ env.BASE_IMAGE_NAME }}-${{ matrix.os }}-${{ github.run_id }} key: ${{ env.BASE_IMAGE_NAME }}-${{ matrix.os }}-${{ github.run_id }}
@ -555,7 +555,7 @@ jobs:
$Env:DIGEST | Set-Content -Path $Env:CACHE_FILE_NAME $Env:DIGEST | Set-Content -Path $Env:CACHE_FILE_NAME
- name: Cache image digest - name: Cache image digest
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with: with:
path: ${{ env.BASE_BUILD_IMAGE_NAME }}_${{ matrix.os }}_${{ matrix.component }} path: ${{ env.BASE_BUILD_IMAGE_NAME }}_${{ matrix.os }}_${{ matrix.component }}
key: ${{ env.BASE_BUILD_IMAGE_NAME }}-${{ matrix.os }}-${{ github.run_id }} key: ${{ env.BASE_BUILD_IMAGE_NAME }}-${{ matrix.os }}-${{ github.run_id }}
@ -576,13 +576,13 @@ jobs:
component: ${{ fromJson(needs.init_build.outputs.components) }} component: ${{ fromJson(needs.init_build.outputs.components) }}
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
ref: ${{ env.TRUNK_ONLY_EVENT == 'true' && env.TRUNK_GIT_BRANCH || '' }} ref: ${{ env.TRUNK_ONLY_EVENT == 'true' && env.TRUNK_GIT_BRANCH || '' }}
fetch-depth: 1 fetch-depth: 1
- name: Install cosign - name: Install cosign
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a
with: with:
cosign-release: 'v2.4.0' cosign-release: 'v2.4.0'
@ -590,7 +590,7 @@ jobs:
run: cosign version run: cosign version
- name: Login to DockerHub - name: Login to DockerHub
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
@ -611,7 +611,7 @@ jobs:
- name: Generate tags - name: Generate tags
id: meta id: meta
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0 uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
with: with:
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGES_PREFIX }}${{ matrix.component }} images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGES_PREFIX }}${{ matrix.component }}
context: ${{ env.TRUNK_ONLY_EVENT == 'true' && 'git' || '' }} context: ${{ env.TRUNK_ONLY_EVENT == 'true' && 'git' || '' }}
@ -627,7 +627,7 @@ jobs:
latest=false latest=false
- name: Download SHA256 tag of ${{ env.BASE_BUILD_IMAGE_NAME }}:${{ matrix.os }} - name: Download SHA256 tag of ${{ env.BASE_BUILD_IMAGE_NAME }}:${{ matrix.os }}
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with: with:
path: ${{ env.BASE_BUILD_IMAGE_NAME }}_${{ matrix.os }}_${{ matrix.component }} path: ${{ env.BASE_BUILD_IMAGE_NAME }}_${{ matrix.os }}_${{ matrix.component }}
key: ${{ env.BASE_BUILD_IMAGE_NAME }}-${{ matrix.os }}-${{ github.run_id }} key: ${{ env.BASE_BUILD_IMAGE_NAME }}-${{ matrix.os }}-${{ github.run_id }}
@ -675,7 +675,8 @@ jobs:
BASE_BUILD_OS_TAG: ${{ steps.base_os_tag.outputs.os_tag }} BASE_BUILD_OS_TAG: ${{ steps.base_os_tag.outputs.os_tag }}
LABEL_REVISION: ${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }} LABEL_REVISION: ${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
LABEL_CREATED: ${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }} LABEL_CREATED: ${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
OS_BASE_IMAGE_NAME: ${{ env.OS_BASE_IMAGE_NAME }} PWSH_BASE_IMAGE_NAME: ${{ env.PWSH_BASE_IMAGE_NAME }}
PWSH_BASE_IMAGE_PREFIX: ${{ env.PWSH_BASE_IMAGE_PREFIX }}
AUTO_PUSH_IMAGES: ${{ env.AUTO_PUSH_IMAGES }} AUTO_PUSH_IMAGES: ${{ env.AUTO_PUSH_IMAGES }}
run: | run: |
echo "::group::Docker version" echo "::group::Docker version"
@ -696,8 +697,8 @@ jobs:
# PowerShell images based on LTSC 2019 and LTSC 2016 do not have "ltsc" prefix # PowerShell images based on LTSC 2019 and LTSC 2016 do not have "ltsc" prefix
$os_tag_suffix=$Env:BASE_BUILD_OS_TAG $os_tag_suffix=$Env:BASE_BUILD_OS_TAG
# $os_tag_suffix=$os_tag_suffix -replace "ltsc2019",'1809' $os_tag_suffix=$os_tag_suffix -replace "ltsc2019",'1809'
$base_image=$Env:OS_BASE_IMAGE_NAME + ':' + $os_tag_suffix $base_image=$Env:PWSH_BASE_IMAGE_NAME + ':' + $Env:PWSH_BASE_IMAGE_PREFIX + $os_tag_suffix
echo "::group::Image tags" echo "::group::Image tags"
echo "$Env:TAGS" echo "$Env:TAGS"

View File

@ -34,7 +34,7 @@ jobs:
zabbix_release: ${{ steps.branch_info.outputs.zabbix_release }} zabbix_release: ${{ steps.branch_info.outputs.zabbix_release }}
steps: steps:
- name: Block egress traffic - name: Block egress traffic
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with: with:
disable-sudo: true disable-sudo: true
egress-policy: block egress-policy: block
@ -42,7 +42,7 @@ jobs:
github.com:443 github.com:443
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
fetch-depth: 1 fetch-depth: 1
sparse-checkout: ${{ env.MATRIX_FILE }} sparse-checkout: ${{ env.MATRIX_FILE }}
@ -98,7 +98,7 @@ jobs:
component: ${{ fromJson(needs.init.outputs.components) }} component: ${{ fromJson(needs.init.outputs.components) }}
steps: steps:
- name: Block egress traffic - name: Block egress traffic
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with: with:
disable-sudo: true disable-sudo: true
egress-policy: block egress-policy: block
@ -109,7 +109,7 @@ jobs:
pypi.org:443 pypi.org:443
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
fetch-depth: 1 fetch-depth: 1
@ -127,7 +127,7 @@ jobs:
echo "matrix_build=${MATRIX_BUILD}" >> $GITHUB_OUTPUT echo "matrix_build=${MATRIX_BUILD}" >> $GITHUB_OUTPUT
- name: Setup Python 3.x - name: Setup Python 3.x
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with: with:
python-version: '3.x' python-version: '3.x'

View File

@ -33,17 +33,17 @@ jobs:
steps: steps:
- name: Harden Runner - name: Harden Runner
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with: with:
egress-policy: audit egress-policy: audit
- name: "Checkout code" - name: "Checkout code"
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
persist-credentials: false persist-credentials: false
- name: "Run analysis" - name: "Run analysis"
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3 uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
with: with:
results_file: results.sarif results_file: results.sarif
results_format: sarif results_format: sarif
@ -65,7 +65,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab. # format to the repository Actions tab.
- name: "Upload artifact" - name: "Upload artifact"
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with: with:
name: SARIF file name: SARIF file
path: results.sarif path: results.sarif
@ -73,6 +73,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard. # Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning" - name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@1b168cd39490f61582a9beae412bb7057a6b2c4e # v4.31.8 uses: github/codeql-action/upload-sarif@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
with: with:
sarif_file: results.sarif sarif_file: results.sarif

View File

@ -30,9 +30,9 @@ name: SonarCloud analysis
on: on:
push: push:
branches: [ "7.4" ] branches: [ "7.2" ]
pull_request: pull_request:
branches: [ "7.4" ] branches: [ "7.2" ]
workflow_dispatch: workflow_dispatch:
permissions: permissions:
@ -44,18 +44,36 @@ jobs:
steps: steps:
- name: Block egress traffic - name: Block egress traffic
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with: with:
egress-policy: audit egress-policy: audit
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
# Disabling shallow clone is recommended for improving relevancy of reporting # Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0 fetch-depth: 0
- name: Analyze with SonarCloud - name: Analyze with SonarCloud
uses: SonarSource/sonarqube-scan-action@v7.0.0
# You can pin the exact commit or the version.
# uses: SonarSource/sonarcloud-github-action@e44258b109568baa0df60ed515909fc6c72cba92
uses: SonarSource/sonarcloud-github-action@e44258b109568baa0df60ed515909fc6c72cba92 # v2.3.0
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret) SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret)
with:
# Additional arguments for the sonarcloud scanner
args:
# Unique keys of your project and organization. You can find them in SonarCloud > Information (bottom-left menu)
# mandatory
-Dsonar.projectKey=zabbix-docker
-Dsonar.organization=zabbix
# Comma-separated paths to directories containing main source files.
#-Dsonar.sources= # optional, default is project base directory
# When you need the analysis to take place in a directory other than the one from which it was launched
#-Dsonar.projectBaseDir= # optional, default is .
# Comma-separated paths to directories containing test source files.
#-Dsonar.tests= # optional. For more info about Code Coverage, please refer to https://docs.sonarcloud.io/enriching/test-coverage/overview/
# Adds more detail to both client and server-side analysis logs, activating DEBUG mode for the scanner, and adding client-side environment variables and system properties to the server-side log of analysis report processing.
#-Dsonar.verbose= # optional, default is false

2
.gitignore vendored
View File

@ -6,5 +6,3 @@ zbx_env*/
.*CA_FILE .*CA_FILE
Dockerfiles/*/rhel/secrets/* Dockerfiles/*/rhel/secrets/*
sources/* sources/*
.*.orig
.*.rej

View File

@ -14,17 +14,17 @@ Zabbix agent is deployed on a monitoring target to actively monitor local resour
# Zabbix agent images # Zabbix agent images
These are the only official Zabbix agent Docker images. They are based on Alpine Linux v3.23, Ubuntu 24.04 (noble), CentOS Stream 10, Oracle Linux 10, Windows 10 LTSC 2019 and Windows 11 LTSC 2022 images. The available versions of Zabbix agent are: These are the only official Zabbix agent Docker images. They are based on Alpine Linux v3.21, Ubuntu 24.04 (noble), CentOS Stream 9, Oracle Linux 9, Windows 10 LTSC 2019 and Windows 11 LTSC 2022 images. The available versions of Zabbix agent are:
Zabbix agent 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest, ltsc2019-5.0-latest, ltsc2022-5.0-latest)
Zabbix agent 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*, ltsc2019-5.0.*, ltsc2022-5.0.*)
Zabbix agent 6.0 (tags: alpine-6.0-latest, ubuntu-6.0-latest, ol-6.0-latest) Zabbix agent 6.0 (tags: alpine-6.0-latest, ubuntu-6.0-latest, ol-6.0-latest)
Zabbix agent 6.0.* (tags: alpine-6.0.*, ubuntu-6.0.*, ol-6.0.*, ltsc2019-6.0.*, ltsc2022-6.0.*) Zabbix agent 6.0.* (tags: alpine-6.0.*, ubuntu-6.0.*, ol-6.0.*, ltsc2019-6.0.*, ltsc2022-6.0.*)
Zabbix agent 7.0 (tags: alpine-7.0-latest, ubuntu-7.0-latest, ol-7.0-latest) Zabbix agent 7.0 (tags: alpine-7.0-latest, ubuntu-7.0-latest, ol-7.0-latest)
Zabbix agent 7.0.* (tags: alpine-7.0.*, ubuntu-7.0.*, ol-7.0.*, ltsc2019-7.0.*, ltsc2022-7.0.*) Zabbix agent 7.0.* (tags: alpine-7.0.*, ubuntu-7.0.*, ol-7.0.*, ltsc2019-7.0.*, ltsc2022-7.0.*)
Zabbix agent 7.2 (tags: alpine-7.2-latest, ubuntu-7.2-latest, ol-7.2-latest) Zabbix agent 7.2 (tags: alpine-7.2-latest, ubuntu-7.2-latest, ol-7.2-latest, alpine-latest, ubuntu-latest, ol-latest, ltsc2019-latest, ltsc2022-latest, latest)
Zabbix agent 7.2.* (tags: alpine-7.2.*, ubuntu-7.2.*, ol-7.2.*, ltsc2019-7.2.*, ltsc2022-7.2.*) Zabbix agent 7.2.* (tags: alpine-7.2.*, ubuntu-7.2.*, ol-7.2.*, ltsc2019-7.2.*, ltsc2022-7.2.*)
Zabbix agent 7.4 (tags: alpine-7.4-latest, ubuntu-7.4-latest, ol-7.4-latest, alpine-latest, ubuntu-latest, ol-latest, ltsc2019-latest, ltsc2022-latest, latest) Zabbix agent 7.4 (tags: alpine-trunk, ubuntu-trunk, ol-trunk, ltsc2019-trunk, ltsc2022-trunk)
Zabbix agent 7.4.* (tags: alpine-7.4.*, ubuntu-7.4.*, ol-7.4.*, ltsc2019-7.4.*, ltsc2022-7.4.*)
Zabbix agent 8.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk, ltsc2019-trunk, ltsc2022-trunk)
Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux.
@ -225,7 +225,7 @@ Please see [the Docker installation documentation](https://docs.docker.com/insta
## Documentation ## Documentation
Documentation for this image is stored in the [`agent/` directory](https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/agent) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/7.4/README.md) before attempting a pull request. Documentation for this image is stored in the [`agent/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/agent) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/trunk/README.md) before attempting a pull request.
## Issues ## Issues

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=alpine:3.23 ARG OS_BASE_IMAGE=alpine:3.21
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -41,7 +41,6 @@ RUN set -eux && \
tzdata \ tzdata \
coreutils \ coreutils \
iputils \ iputils \
c-ares \
pcre2 \ pcre2 \
libgcc \ libgcc \
libcurl \ libcurl \

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=quay.io/centos/centos:stream10-minimal ARG OS_BASE_IMAGE=quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -41,12 +41,10 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
set -eux && \ set -eux && \
INSTALL_PKGS="bash \ INSTALL_PKGS="bash \
iputils \ iputils \
c-ares \
pcre2 \ pcre2 \
libcurl-minimal \ libcurl-minimal \
# libmodbus \ libmodbus \
openssl-libs \ openssl-libs \
openldap \
shadow-utils \ shadow-utils \
zlib" && \ zlib" && \
microdnf -y install \ microdnf -y install \

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=container-registry.oracle.com/os/oraclelinux:10-slim ARG OS_BASE_IMAGE=oraclelinux:9-slim
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -35,24 +35,23 @@ STOPSIGNAL SIGTERM
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/sbin/zabbix_agentd", "/usr/sbin/zabbix_agentd"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/sbin/zabbix_agentd", "/usr/sbin/zabbix_agentd"]
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/conf/", "${ZABBIX_CONF_DIR}/"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/conf/", "${ZABBIX_CONF_DIR}/"]
COPY ["conf/etc/yum.repos.d/oracle-epel-ol10.repo", "/etc/yum.repos.d/oracle-epel-ol10.repo"] COPY ["conf/etc/yum.repos.d/oracle-epel-ol9.repo", "/etc/yum.repos.d/oracle-epel-ol9.repo"]
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--mount=type=tmpfs,target=/var/cache/yum/ \ --mount=type=tmpfs,target=/var/cache/yum/ \
set -eux && \ set -eux && \
INSTALL_PKGS="bash \ INSTALL_PKGS="bash \
iputils \ iputils \
c-ares \
pcre2 \ pcre2 \
libcurl \ libcurl \
# libmodbus \ libmodbus \
openssl-libs \ openssl-libs \
zlib" && \ zlib" && \
microdnf -y install \ microdnf -y install \
--disablerepo="*" \ --disablerepo="*" \
--enablerepo="ol10_baseos_latest" \ --enablerepo="ol9_baseos_latest" \
--enablerepo="ol10_appstream" \ --enablerepo="ol9_appstream" \
--enablerepo="ol10_u0_developer_EPEL" \ --enablerepo="ol9_developer_EPEL" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--setopt=keepcache=0 \ --setopt=keepcache=0 \
--best \ --best \

View File

@ -1,6 +0,0 @@
[ol10_u0_developer_EPEL]
name=Oracle Linux $releasever.0 EPEL Packages for Development ($basearch)
baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL10/0/developer/EPEL/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

View File

@ -0,0 +1,6 @@
[ol9_developer_EPEL]
name=Oracle Linux $releasever EPEL Packages for Development ($basearch)
baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL9/developer/EPEL/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

View File

@ -1,8 +1,8 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=registry.access.redhat.com/ubi10/ubi-minimal:10.1 ARG OS_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:9.5
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG RELEASE=6 ARG RELEASE=0
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -24,9 +24,9 @@ ENV ZBX_LOADMODULEPATH="${ZABBIX_USER_HOME_DIR}/modules" \
LABEL description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \ LABEL description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
maintainer="alexey.pustovalov@zabbix.com" \ maintainer="alexey.pustovalov@zabbix.com" \
name="zabbix/zabbix-agent-74" \ name="zabbix/zabbix-agent-trunk" \
release="${RELEASE}" \ release="${RELEASE}" \
run="podman run --name zabbix-agent -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent-74:${ZBX_VERSION}" \ run="podman run --name zabbix-agent -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent-trunk:${ZBX_VERSION}" \
summary="Zabbix agent" \ summary="Zabbix agent" \
url="https://www.zabbix.com/" \ url="https://www.zabbix.com/" \
vendor="Zabbix SIA" \ vendor="Zabbix SIA" \
@ -37,7 +37,7 @@ LABEL description="Zabbix agent is deployed on a monitoring target to actively m
io.openshift.tags="zabbix,zabbix-agent" \ io.openshift.tags="zabbix,zabbix-agent" \
org.label-schema.build-date="${BUILD_DATE}" \ org.label-schema.build-date="${BUILD_DATE}" \
org.label-schema.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \ org.label-schema.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
org.label-schema.docker.cmd="podman run --name zabbix-agent -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent-74:${ZBX_VERSION}" \ org.label-schema.docker.cmd="podman run --name zabbix-agent -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent-trunk:${ZBX_VERSION}" \
org.label-schema.license="AGPL v3.0" \ org.label-schema.license="AGPL v3.0" \
org.label-schema.name="zabbix-agent-rhel" \ org.label-schema.name="zabbix-agent-rhel" \
org.label-schema.schema-version="1.0" \ org.label-schema.schema-version="1.0" \
@ -61,20 +61,17 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
INSTALL_PKGS="bash \ INSTALL_PKGS="bash \
iputils \ iputils \
shadow-utils \ shadow-utils \
c-ares \
pcre2 \ pcre2 \
# libmodbus \ libmodbus \
libcurl-minimal \ libcurl-minimal \
openldap \
zlib" && \ zlib" && \
curl --tlsv1.2 -sSf -L https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm -o /tmp/epel-release-latest-10.noarch.rpm && \ curl --tlsv1.2 -sSf -L https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm -o /tmp/epel-release-latest-9.noarch.rpm && \
rpm -ivh /tmp/epel-release-latest-10.noarch.rpm && \ rpm -ivh /tmp/epel-release-latest-9.noarch.rpm && \
rm -rf /tmp/epel-release-latest-10.noarch.rpm && \ rm -rf /tmp/epel-release-latest-9.noarch.rpm && \
ARCH_SUFFIX="$(arch)"; \
microdnf -y install \ microdnf -y install \
--disableplugin=subscription-manager \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "ubi-10-baseos-rpms" \ --enablerepo "ubi-9-baseos-rpms" \
--enablerepo "rhel-10-for-$ARCH_SUFFIX-baseos-rpms" \
--enablerepo "epel" \ --enablerepo "epel" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--setopt=keepcache=0 \ --setopt=keepcache=0 \
@ -84,20 +81,20 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
microdnf -y update \ microdnf -y update \
--disableplugin=subscription-manager \ --disableplugin=subscription-manager \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "ubi-10-baseos-rpms" \ --enablerepo "ubi-9-baseos-rpms" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--best \ --best \
--setopt=tsflags=nodocs \ --setopt=tsflags=nodocs \
tzdata && \ tzdata && \
# microdnf -y reinstall \ microdnf -y reinstall \
# --disableplugin=subscription-manager \ --disableplugin=subscription-manager \
# --disablerepo "*" \ --disablerepo "*" \
# --enablerepo "ubi-10-baseos-rpms" \ --enablerepo "ubi-9-baseos-rpms" \
# --setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
# --setopt=keepcache=0 \ --setopt=keepcache=0 \
# --best \ --best \
# --setopt=tsflags=nodocs \ --setopt=tsflags=nodocs \
# tzdata && \ tzdata && \
groupadd \ groupadd \
--system \ --system \
--gid 1995 \ --gid 1995 \

View File

@ -111,7 +111,7 @@
<p>The volume is used to store TLS related files. These file names are specified using <code>ZBX_TLSCAFILE</code>, <code>ZBX_TLSCRLFILE</code>, <code>ZBX_TLSKEY_FILE</code> and <code>ZBX_TLSPSKFILE</code> variables.</p> <p>The volume is used to store TLS related files. These file names are specified using <code>ZBX_TLSCAFILE</code>, <code>ZBX_TLSCRLFILE</code>, <code>ZBX_TLSKEY_FILE</code> and <code>ZBX_TLSPSKFILE</code> variables.</p>
<h1 id="user-feedback">User Feedback</h1> <h1 id="user-feedback">User Feedback</h1>
<h2 id="documentation">Documentation</h2> <h2 id="documentation">Documentation</h2>
<p>Documentation for this image is stored in the <a href="https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/agent"><code>agent/</code> directory</a> of the <a href="https://github.com/zabbix/zabbix-docker/"><code>zabbix/zabbix-docker</code> GitHub repo</a>. Be sure to familiarize yourself with the <a href="https://github.com/zabbix/zabbix-docker/blob/7.4/README.md">repository&#39;s <code>README.md</code> file</a> before attempting a pull request.</p> <p>Documentation for this image is stored in the <a href="https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/agent"><code>agent/</code> directory</a> of the <a href="https://github.com/zabbix/zabbix-docker/"><code>zabbix/zabbix-docker</code> GitHub repo</a>. Be sure to familiarize yourself with the <a href="https://github.com/zabbix/zabbix-docker/blob/trunk/README.md">repository&#39;s <code>README.md</code> file</a> before attempting a pull request.</p>
<h2 id="issues">Issues</h2> <h2 id="issues">Issues</h2>
<p>If you have any problems with or questions about this image, please contact us through a <a href="https://github.com/zabbix/zabbix-docker/issues">GitHub issue</a>.</p> <p>If you have any problems with or questions about this image, please contact us through a <a href="https://github.com/zabbix/zabbix-docker/issues">GitHub issue</a>.</p>
<h3 id="known-issues">Known issues</h3> <h3 id="known-issues">Known issues</h3>

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=ubuntu:noble ARG OS_BASE_IMAGE=ubuntu:noble
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -42,9 +42,7 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \
INSTALL_PKGS="bash \ INSTALL_PKGS="bash \
tzdata \ tzdata \
iputils-ping \
ca-certificates \ ca-certificates \
libcares2 \
libssl3t64 \ libssl3t64 \
libcurl4t64 \ libcurl4t64 \
libmodbus5 \ libmodbus5 \

View File

@ -1,9 +1,9 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
# escape=` # escape=`
ARG OS_BASE_IMAGE=mcr.microsoft.com/windows/nanoserver:ltsc2022 ARG OS_BASE_IMAGE=mcr.microsoft.com/powershell:lts-nanoserver-ltsc2022
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-agent:ltsc2022-agent-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-agent:ltsc2022-agent-${ZBX_VERSION}
@ -29,18 +29,15 @@ LABEL org.opencontainers.image.title="Zabbix agent" `
org.opencontainers.image.version="${ZBX_VERSION}" ` org.opencontainers.image.version="${ZBX_VERSION}" `
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}"
COPY --from=builder ["C:\\zabbix-${ZBX_VERSION}-output", "C:\\zabbix"] SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop';"]
COPY --from=builder ["C:\\build_deps\\pwsh", "C:\\Program Files\\PowerShell"]
COPY [".\\docker-entrypoint.ps1", "C:\\zabbix"]
WORKDIR C:\zabbix\ WORKDIR C:\zabbix\
COPY --from=builder ["C:\\zabbix-${ZBX_VERSION}-output", "C:\\zabbix"]
COPY [".\\docker-entrypoint.ps1", "C:\\zabbix"]
USER ContainerAdministrator USER ContainerAdministrator
RUN setx /M PATH "%PATH%;C:\Program Files\PowerShell"
SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop';"]
RUN $env:PATH = [string]::Format('{0}\zabbix\sbin;{0}\zabbix\bin;', $env:SystemDrive) + $env:PATH; ` RUN $env:PATH = [string]::Format('{0}\zabbix\sbin;{0}\zabbix\bin;', $env:SystemDrive) + $env:PATH; `
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); ` [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); `
` `

View File

@ -14,17 +14,17 @@ Zabbix agent 2 is deployed on a monitoring target to actively monitor local reso
# Zabbix agent 2 images # Zabbix agent 2 images
These are the only official Zabbix agent 2 Docker images. They are based on Alpine Linux v3.23, Ubuntu 24.04 (noble), CentOS Stream 10, Oracle Linux 10, Windows 10 LTSC 2019 and Windows 11 LTSC 2022 images. The available versions of Zabbix agent 2 are: These are the only official Zabbix agent 2 Docker images. They are based on Alpine Linux v3.21, Ubuntu 24.04 (noble), CentOS Stream 9, Oracle Linux 9, Windows 10 LTSC 2019 and Windows 11 LTSC 2022 images. The available versions of Zabbix agent 2 are:
Zabbix agent 2 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest , ltsc2019-5.0-latest, ltsc2022-5.0-latest)
Zabbix agent 2 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*, ltsc2019-5.0.*, ltsc2022-5.0.*)
Zabbix agent 2 6.0 (tags: alpine-6.0-latest, ubuntu-6.0-latest, ol-6.0-latest) Zabbix agent 2 6.0 (tags: alpine-6.0-latest, ubuntu-6.0-latest, ol-6.0-latest)
Zabbix agent 2 6.0.* (tags: alpine-6.0.*, ubuntu-6.0.*, ol-6.0.*, ltsc2019-6.0.*, ltsc2022-6.0.*) Zabbix agent 2 6.0.* (tags: alpine-6.0.*, ubuntu-6.0.*, ol-6.0.*, ltsc2019-6.0.*, ltsc2022-6.0.*)
Zabbix agent 2 7.0 (tags: alpine-7.0-latest, ubuntu-7.0-latest, ol-7.0-latest) Zabbix agent 2 7.0 (tags: alpine-7.0-latest, ubuntu-7.0-latest, ol-7.0-latest)
Zabbix agent 2 7.0.* (tags: alpine-7.0.*, ubuntu-7.0.*, ol-7.0.*, ltsc2019-7.0.*, ltsc2022-7.0.*) Zabbix agent 2 7.0.* (tags: alpine-7.0.*, ubuntu-7.0.*, ol-7.0.*, ltsc2019-7.0.*, ltsc2022-7.0.*)
Zabbix agent 2 7.2 (tags: alpine-7.2-latest, ubuntu-7.2-latest, ol-7.2-latest) Zabbix agent 2 7.2 (tags: alpine-7.2-latest, ubuntu-7.2-latest, ol-7.2-latest, alpine-latest, ubuntu-latest, ol-latest, ltsc2019-latest, ltsc2022-latest, latest)
Zabbix agent 2 7.2.* (tags: alpine-7.2.*, ubuntu-7.2.*, ol-7.2.*, ltsc2019-7.2.*, ltsc2022-7.2.*) Zabbix agent 2 7.2.* (tags: alpine-7.2.*, ubuntu-7.2.*, ol-7.0.*, ltsc2019-7.2.*, ltsc2022-7.2.*)
Zabbix agent 2 7.4 (tags: alpine-7.4-latest, ubuntu-7.4-latest, ol-7.4-latest, alpine-latest, ubuntu-latest, ol-latest, ltsc2019-latest, ltsc2022-latest, latest) Zabbix agent 2 7.4 (tags: alpine-trunk, ubuntu-trunk, ol-trunk, ltsc2019-trunk, ltsc2022-trunk)
Zabbix agent 2 7.4.* (tags: alpine-7.4.*, ubuntu-7.4.*, ol-7.4.*, ltsc2019-7.4.*, ltsc2022-7.4.*)
Zabbix agent 2 8.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk, ltsc2019-trunk, ltsc2022-trunk)
Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux.
@ -215,7 +215,7 @@ Please see [the Docker installation documentation](https://docs.docker.com/insta
## Documentation ## Documentation
Documentation for this image is stored in the [`agent2/` directory](https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/agent2) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/7.4/README.md) before attempting a pull request. Documentation for this image is stored in the [`agent2/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/agent2) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/trunk/README.md) before attempting a pull request.
## Issues ## Issues

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=alpine:3.23 ARG OS_BASE_IMAGE=alpine:3.21
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=quay.io/centos/centos:stream10-minimal ARG OS_BASE_IMAGE=quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=container-registry.oracle.com/os/oraclelinux:10-slim ARG OS_BASE_IMAGE=oraclelinux:9-slim
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -35,7 +35,7 @@ STOPSIGNAL SIGTERM
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/sbin/", "/usr/sbin/"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/sbin/", "/usr/sbin/"]
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/conf/", "${ZABBIX_CONF_DIR}/"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/conf/", "${ZABBIX_CONF_DIR}/"]
COPY ["conf/etc/yum.repos.d/oracle-epel-ol10.repo", "/etc/yum.repos.d/oracle-epel-ol10.repo"] COPY ["conf/etc/yum.repos.d/oracle-epel-ol9.repo", "/etc/yum.repos.d/oracle-epel-ol9.repo"]
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--mount=type=tmpfs,target=/var/cache/yum/ \ --mount=type=tmpfs,target=/var/cache/yum/ \
@ -49,9 +49,9 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
openssl-libs" && \ openssl-libs" && \
microdnf -y install \ microdnf -y install \
--disablerepo="*" \ --disablerepo="*" \
--enablerepo="ol10_baseos_latest" \ --enablerepo="ol9_baseos_latest" \
--enablerepo="ol10_appstream" \ --enablerepo="ol9_appstream" \
--enablerepo="ol10_u0_developer_EPEL" \ --enablerepo="ol9_developer_EPEL" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--setopt=keepcache=0 \ --setopt=keepcache=0 \
--best \ --best \

View File

@ -1,6 +0,0 @@
[ol10_u0_developer_EPEL]
name=Oracle Linux $releasever.0 EPEL Packages for Development ($basearch)
baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL10/0/developer/EPEL/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

View File

@ -0,0 +1,6 @@
[ol9_developer_EPEL]
name=Oracle Linux $releasever EPEL Packages for Development ($basearch)
baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL9/developer/EPEL/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

View File

@ -1,8 +1,8 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=registry.access.redhat.com/ubi10/ubi-minimal:10.1 ARG OS_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:9.5
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG RELEASE=6 ARG RELEASE=0
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -24,9 +24,9 @@ ENV ZBX_PERSISTENTBUFFERFILE="$ZABBIX_USER_HOME_DIR/buffer/agent2.db" \
LABEL description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \ LABEL description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
maintainer="alexey.pustovalov@zabbix.com" \ maintainer="alexey.pustovalov@zabbix.com" \
name="zabbix/zabbix-agent2-74" \ name="zabbix/zabbix-agent2-trunk" \
release="${RELEASE}" \ release="${RELEASE}" \
run="docker run --name zabbix-agent2 --link zabbix-server:zabbix-server -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent2-74:${ZBX_VERSION}" \ run="docker run --name zabbix-agent2 --link zabbix-server:zabbix-server -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent2-trunk:${ZBX_VERSION}" \
summary="Zabbix agent" \ summary="Zabbix agent" \
url="https://www.zabbix.com/" \ url="https://www.zabbix.com/" \
vendor="Zabbix SIA" \ vendor="Zabbix SIA" \
@ -37,7 +37,7 @@ LABEL description="Zabbix agent 2 is deployed on a monitoring target to actively
io.openshift.tags="zabbix,zabbix-agent" \ io.openshift.tags="zabbix,zabbix-agent" \
org.label-schema.build-date="${BUILD_DATE}" \ org.label-schema.build-date="${BUILD_DATE}" \
org.label-schema.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \ org.label-schema.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
org.label-schema.docker.cmd="docker run --name zabbix-agent2 --link zabbix-server:zabbix-server -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent2-74:${ZBX_VERSION}" \ org.label-schema.docker.cmd="docker run --name zabbix-agent2 --link zabbix-server:zabbix-server -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent2-trunk:${ZBX_VERSION}" \
org.label-schema.license="AGPL v3.0" \ org.label-schema.license="AGPL v3.0" \
org.label-schema.name="zabbix-agent2-rhel" \ org.label-schema.name="zabbix-agent2-rhel" \
org.label-schema.schema-version="1.0" \ org.label-schema.schema-version="1.0" \
@ -62,13 +62,13 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
iputils \ iputils \
shadow-utils \ shadow-utils \
pcre2 \ pcre2 \
# smartmontools \ smartmontools \
sudo \ sudo \
libcurl-minimal" && \ libcurl-minimal" && \
microdnf -y install \ microdnf -y install \
--disableplugin=subscription-manager \ --disableplugin=subscription-manager \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "ubi-10-baseos-rpms" \ --enablerepo "ubi-9-baseos-rpms" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--setopt=keepcache=0 \ --setopt=keepcache=0 \
--best \ --best \
@ -77,20 +77,20 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
microdnf -y update \ microdnf -y update \
--disableplugin=subscription-manager \ --disableplugin=subscription-manager \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "ubi-10-baseos-rpms" \ --enablerepo "ubi-9-baseos-rpms" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--best \ --best \
--setopt=tsflags=nodocs \ --setopt=tsflags=nodocs \
tzdata && \ tzdata && \
# microdnf -y reinstall \ microdnf -y reinstall \
# --disableplugin=subscription-manager \ --disableplugin=subscription-manager \
# --disablerepo "*" \ --disablerepo "*" \
# --enablerepo "ubi-9-baseos-rpms" \ --enablerepo "ubi-9-baseos-rpms" \
# --setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
# --setopt=keepcache=0 \ --setopt=keepcache=0 \
# --best \ --best \
# --setopt=tsflags=nodocs \ --setopt=tsflags=nodocs \
# tzdata && \ tzdata && \
groupadd \ groupadd \
--system \ --system \
--gid 1995 \ --gid 1995 \

View File

@ -1,144 +0,0 @@
# syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=nvidia/cuda:12.9.0-base-ubi9
ARG MAJOR_VERSION=7.2
ARG RELEASE=7
ARG ZBX_VERSION=${MAJOR_VERSION}.7
ARG BUILD_BASE_IMAGE=registry.connect.redhat.com/zabbix/zabbix-agent2-72:${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder
FROM ${OS_BASE_IMAGE}
ARG MAJOR_VERSION
ARG RELEASE
ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
ZABBIX_CONF_DIR="/etc/zabbix"
ENV ZBX_PERSISTENTBUFFERFILE="$ZABBIX_USER_HOME_DIR/buffer/agent2.db" \
ZBX_USERPARAMETERDIR=${ZABBIX_USER_HOME_DIR}/user_scripts
LABEL description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
maintainer="alexey.pustovalov@zabbix.com" \
name="zabbix/zabbix-agent2-72" \
release="${RELEASE}" \
run="docker run --name zabbix-agent2 --link zabbix-server:zabbix-server -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent2-72:${ZBX_VERSION}" \
summary="Zabbix agent" \
url="https://www.zabbix.com/" \
vendor="Zabbix SIA" \
version="${MAJOR_VERSION}" \
io.k8s.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
io.k8s.display-name="Zabbix Agent 2" \
io.openshift.expose-services="10050:10050" \
io.openshift.tags="zabbix,zabbix-agent" \
org.label-schema.build-date="${BUILD_DATE}" \
org.label-schema.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
org.label-schema.docker.cmd="docker run --name zabbix-agent2 --link zabbix-server:zabbix-server -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent2-72:${ZBX_VERSION}" \
org.label-schema.license="AGPL v3.0" \
org.label-schema.name="zabbix-agent2-rhel" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="https://zabbix.com/" \
org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.vcs-url="${ZBX_SOURCES}" \
org.label-schema.vendor="Zabbix SIA" \
org.label-schema.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM
COPY ["licenses", "/licenses"]
COPY --from=builder ["/usr/sbin/zabbix*", "/usr/sbin/"]
COPY --from=builder ["/usr/sbin/zabbix-agent2-plugin/", "/usr/sbin/zabbix-agent2-plugin/"]
COPY --from=builder ["/usr/bin/zabbix*", "/usr/bin/"]
COPY --from=builder ["/etc/zabbix/", "${ZABBIX_CONF_DIR}/"]
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--mount=type=tmpfs,target=/var/cache/yum/ \
set -eux && \
INSTALL_PKGS="bash \
iputils \
shadow-utils \
pcre2 \
# smartmontools \
sudo \
libcurl-minimal" && \
dnf -y install \
--disableplugin=subscription-manager \
--disablerepo "*" \
--enablerepo "ubi-9-baseos-rpms" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \
--setopt=tsflags=nodocs \
${INSTALL_PKGS} && \
dnf -y update \
--disableplugin=subscription-manager \
--disablerepo "*" \
--enablerepo "ubi-9-baseos-rpms" \
--setopt=install_weak_deps=0 \
--best \
--setopt=tsflags=nodocs \
tzdata && \
dnf -y reinstall \
--disableplugin=subscription-manager \
--disablerepo "*" \
--enablerepo "ubi-9-baseos-rpms" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \
--setopt=tsflags=nodocs \
tzdata && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
--uid 1997 \
--shell /sbin/nologin \
--home-dir ${ZABBIX_USER_HOME_DIR} \
zabbix && \
echo "zabbix ALL=(root) NOPASSWD: /usr/sbin/smartctl" >> /etc/sudoers.d/zabbix && \
ln -s /usr/lib64/libnvidia-ml.so.1 /usr/lib64/libnvidia-ml.so && \
mkdir -p ${ZABBIX_CONF_DIR} && \
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agentd.d && \
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agent2.d && \
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
mkdir -p ${ZABBIX_USER_HOME_DIR}/buffer && \
mkdir -p ${ZBX_USERPARAMETERDIR} && \
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
${ZABBIX_USER_HOME_DIR}/ && \
chown --quiet zabbix:root ${ZABBIX_CONF_DIR}/ && \
chgrp -R 0 ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
${ZABBIX_USER_HOME_DIR}/ && \
chgrp 0 ${ZABBIX_CONF_DIR} && \
chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
${ZABBIX_USER_HOME_DIR}/ && \
chmod g=u ${ZABBIX_CONF_DIR} && \
/usr/sbin/zabbix_agent2 -V
EXPOSE 10050/TCP 31999/TCP
WORKDIR ${ZABBIX_USER_HOME_DIR}
COPY ["docker-entrypoint.sh", "/usr/bin/"]
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
USER 1997
CMD ["/usr/sbin/zabbix_agent2", "--foreground", "-c", "/etc/zabbix/zabbix_agent2.conf"]

View File

@ -103,7 +103,7 @@
<p>The volume is used to store the file, where Zabbix Agent2 should keep SQLite database. To enable the feature specify <code>ZBX_ENABLEPERSISTENTBUFFER=true</code>. Available since 5.0.0.</p> <p>The volume is used to store the file, where Zabbix Agent2 should keep SQLite database. To enable the feature specify <code>ZBX_ENABLEPERSISTENTBUFFER=true</code>. Available since 5.0.0.</p>
<h1 id="user-feedback">User Feedback</h1> <h1 id="user-feedback">User Feedback</h1>
<h2 id="documentation">Documentation</h2> <h2 id="documentation">Documentation</h2>
<p>Documentation for this image is stored in the <a href="https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/agent2"><code>agent2/</code> directory</a> of the <a href="https://github.com/zabbix/zabbix-docker/"><code>zabbix/zabbix-docker</code> GitHub repo</a>. Be sure to familiarize yourself with the <a href="https://github.com/zabbix/zabbix-docker/blob/7.4/README.md">repository&#39;s <code>README.md</code> file</a> before attempting a pull request.</p> <p>Documentation for this image is stored in the <a href="https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/agent2"><code>agent2/</code> directory</a> of the <a href="https://github.com/zabbix/zabbix-docker/"><code>zabbix/zabbix-docker</code> GitHub repo</a>. Be sure to familiarize yourself with the <a href="https://github.com/zabbix/zabbix-docker/blob/trunk/README.md">repository&#39;s <code>README.md</code> file</a> before attempting a pull request.</p>
<h2 id="issues">Issues</h2> <h2 id="issues">Issues</h2>
<p>If you have any problems with or questions about this image, please contact us through a <a href="https://github.com/zabbix/zabbix-docker/issues">GitHub issue</a>.</p> <p>If you have any problems with or questions about this image, please contact us through a <a href="https://github.com/zabbix/zabbix-docker/issues">GitHub issue</a>.</p>
<h3 id="known-issues">Known issues</h3> <h3 id="known-issues">Known issues</h3>

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=ubuntu:noble ARG OS_BASE_IMAGE=ubuntu:noble
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -42,7 +42,6 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \
INSTALL_PKGS="bash \ INSTALL_PKGS="bash \
tzdata \ tzdata \
iputils-ping \
ca-certificates \ ca-certificates \
smartmontools \ smartmontools \
sudo \ sudo \

View File

@ -1,9 +1,9 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
# escape=` # escape=`
ARG OS_BASE_IMAGE=mcr.microsoft.com/windows/nanoserver:ltsc2022 ARG OS_BASE_IMAGE=mcr.microsoft.com/powershell:lts-nanoserver-ltsc2022
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-agent:ltsc2022-agent2-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-agent:ltsc2022-agent2-${ZBX_VERSION}
@ -30,18 +30,15 @@ LABEL org.opencontainers.image.title="Zabbix agent 2" `
org.opencontainers.image.version="${ZBX_VERSION}" ` org.opencontainers.image.version="${ZBX_VERSION}" `
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}"
COPY --from=builder ["C:\\zabbix-${ZBX_VERSION}-output", "C:\\zabbix"] SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop';"]
COPY --from=builder ["C:\\build_deps\\pwsh", "C:\\Program Files\\PowerShell"]
COPY [".\\docker-entrypoint.ps1", "C:\\zabbix"]
WORKDIR C:\zabbix\ WORKDIR C:\zabbix\
COPY --from=builder ["C:\\zabbix-${ZBX_VERSION}-output", "C:\\zabbix"]
COPY [".\\docker-entrypoint.ps1", "C:\\zabbix"]
USER ContainerAdministrator USER ContainerAdministrator
RUN setx /M PATH "%PATH%;C:\Program Files\PowerShell"
SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop';"]
RUN $env:PATH = [string]::Format('{0}\zabbix\sbin;{0}\zabbix\bin;', $env:SystemDrive) + $env:PATH; ` RUN $env:PATH = [string]::Format('{0}\zabbix\sbin;{0}\zabbix\bin;', $env:SystemDrive) + $env:PATH; `
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); ` [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); `
` `

View File

@ -14,23 +14,23 @@ Zabbix build base image is prepared build environment for building Zabbix compon
# Zabbix build base images # Zabbix build base images
These are the only official Zabbix build base Docker images. They are based on Alpine Linux v3.23, Ubuntu 24.04 (noble), CentOS Stream 10 and Oracle Linux 10 images. The available versions of the image are: These are the only official Zabbix build base Docker images. They are based on Alpine Linux v3.21, Ubuntu 24.04 (noble), CentOS Stream 9 and Oracle Linux 9 images. The available versions of the image are:
Zabbix build base 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest)
Zabbix build base 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*)
Zabbix build base 6.0 (tags: alpine-6.0-latest, ubuntu-6.0-latest, ol-6.0-latest) Zabbix build base 6.0 (tags: alpine-6.0-latest, ubuntu-6.0-latest, ol-6.0-latest)
Zabbix build base 6.0.* (tags: alpine-6.0.*, ubuntu-6.0.*, ol-6.0.*) Zabbix build base 6.0.* (tags: alpine-6.0.*, ubuntu-6.0.*, ol-6.0.*)
Zabbix build base 7.0 (tags: alpine-7.0-latest, ubuntu-7.0-latest, ol-7.0-latest) Zabbix build base 7.0 (tags: alpine-7.0-latest, ubuntu-7.0-latest, ol-7.0-latest)
Zabbix build base 7.0.* (tags: alpine-7.0.*, ubuntu-7.0.*, ol-7.0.*, ltsc2019-7.0.*, ltsc2022-7.0.*) Zabbix build base 7.0.* (tags: alpine-7.0.*, ubuntu-7.0.*, ol-7.0.*, ltsc2019-7.0.*, ltsc2022-7.0.*)
Zabbix build base 7.2 (tags: alpine-7.2-latest, ubuntu-7.2-latest, ol-7.2-latest) Zabbix build base 7.2 (tags: alpine-7.2-latest, ubuntu-7.2-latest, ol-7.2-latest, alpine-latest, ubuntu-latest, ol-latest, latest)
Zabbix build base 7.2.* (tags: alpine-7.2.*, ubuntu-7.2.*, ol-7.2.*, ltsc2019-7.2.*, ltsc2022-7.2.*) Zabbix build base 7.2.* (tags: alpine-7.2.*, ubuntu-7.2.*, ol-7.2.*, ltsc2019-7.2.*, ltsc2022-7.2.*)
Zabbix build base 7.4 (tags: alpine-7.4-latest, ubuntu-7.4-latest, ol-7.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) Zabbix build base 7.4 (tags: alpine-trunk, ubuntu-trunk, ol-trunk, ltsc2019-trunk, ltsc2022-trunk)
Zabbix build base 7.4.* (tags: alpine-7.4.*, ubuntu-7.4.*, ol-7.4.*, ltsc2019-7.4.*, ltsc2022-7.4.*)
Zabbix build base 8.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk, ltsc2019-trunk, ltsc2022-trunk)
Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux.
# How to use this image # How to use this image
The image is required to build Zabbix components. It is base image for [MySQL](https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/build-mysql), [PostgreSQL](https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/build-pgsql) and [SQLite3](https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/build-sqlite3) base images. While the image contains only required packages, MySQL, PostgreSQL and SQLite3 base images compile Zabbix component and prepare them for usage. The image is required to build Zabbix components. It is base image for [MySQL](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-mysql), [PostgreSQL](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-pgsql) and [SQLite3](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-sqlite3) base images. While the image contains only required packages, MySQL, PostgreSQL and SQLite3 base images compile Zabbix component and prepare them for usage.
# The image variants # The image variants
@ -64,7 +64,7 @@ Please see [the Docker installation documentation](https://docs.docker.com/insta
## Documentation ## Documentation
Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request.
## Issues ## Issues

View File

@ -1,9 +1,9 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=alpine:3.23 ARG OS_BASE_IMAGE=alpine:3.21
FROM ${OS_BASE_IMAGE} FROM ${OS_BASE_IMAGE}
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ENV TERM=xterm \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} \ ZBX_VERSION=${ZBX_VERSION} \
@ -30,7 +30,6 @@ RUN set -eux && \
INSTALL_PKGS="bash \ INSTALL_PKGS="bash \
autoconf \ autoconf \
automake \ automake \
c-ares-dev \
coreutils \ coreutils \
curl \ curl \
curl-dev \ curl-dev \

View File

@ -1,9 +1,9 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=quay.io/centos/centos:stream10-minimal ARG OS_BASE_IMAGE=quay.io/centos/centos:stream9-minimal
FROM ${OS_BASE_IMAGE} FROM ${OS_BASE_IMAGE}
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ENV TERM=xterm \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} \ ZBX_VERSION=${ZBX_VERSION} \
@ -27,24 +27,23 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
bash \ bash \
gcc \ gcc \
patch \ patch \
c-ares-devel \
pcre2-devel \ pcre2-devel \
libcurl-devel \ libcurl-devel \
libevent-devel \ libevent-devel \
libssh-devel \ libssh-devel \
# libmodbus-devel \ libmodbus-devel \
libxml2-devel \ libxml2-devel \
openssl-devel \ openssl-devel \
openldap-devel \ openldap-devel \
make \ make \
mysql8.4-devel \ mysql-devel \
net-snmp-devel \ net-snmp-devel \
OpenIPMI-devel \ OpenIPMI-devel \
openldap-devel \ openldap-devel \
sqlite-devel \ sqlite-devel \
postgresql-private-devel \ postgresql-private-devel \
postgresql-server-devel \ postgresql-server-devel \
java-21-openjdk-devel \ java-17-openjdk-devel \
git \ git \
gettext \ gettext \
go-toolset \ go-toolset \
@ -57,6 +56,12 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--setopt=keepcache=0 \ --setopt=keepcache=0 \
--best \ --best \
--nodocs epel-release && \ --nodocs epel-release && \
microdnf -y module enable \
--disablerepo "*" \
--enablerepo "appstream" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
postgresql:16 && \
microdnf -y install \ microdnf -y install \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "baseos" \ --enablerepo "baseos" \

View File

@ -1,9 +1,9 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=container-registry.oracle.com/os/oraclelinux:10-slim ARG OS_BASE_IMAGE=oraclelinux:9-slim
FROM ${OS_BASE_IMAGE} FROM ${OS_BASE_IMAGE}
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ENV TERM=xterm \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} \ ZBX_VERSION=${ZBX_VERSION} \
@ -18,7 +18,7 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
org.opencontainers.image.vendor="Zabbix SIA" \ org.opencontainers.image.vendor="Zabbix SIA" \
org.opencontainers.image.version="${ZBX_VERSION}" org.opencontainers.image.version="${ZBX_VERSION}"
COPY ["conf/etc/yum.repos.d/oracle-epel-ol10.repo", "/etc/yum.repos.d/oracle-epel-ol10.repo"] COPY ["conf/etc/yum.repos.d/oracle-epel-ol9.repo", "/etc/yum.repos.d/oracle-epel-ol9.repo"]
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--mount=type=tmpfs,target=/var/cache/yum/ \ --mount=type=tmpfs,target=/var/cache/yum/ \
@ -29,34 +29,39 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
gcc \ gcc \
go-toolset \ go-toolset \
patch \ patch \
c-ares-devel \
pcre2-devel \ pcre2-devel \
libcurl-devel \ libcurl-devel \
libevent-devel \ libevent-devel \
libssh-devel \ libssh-devel \
# libmodbus-devel \ libmodbus-devel \
libxml2-devel \ libxml2-devel \
openssl-devel \ openssl-devel \
openldap-devel \ openldap-devel \
make \ make \
mysql8.4-devel \ mysql-devel \
net-snmp-devel \ net-snmp-devel \
OpenIPMI-devel \ OpenIPMI-devel \
openldap-devel \ openldap-devel \
sqlite-devel \ sqlite-devel \
postgresql-private-devel \ postgresql-private-devel \
postgresql-server-devel \ postgresql-server-devel \
java-21-openjdk-devel \ java-17-openjdk-devel \
git \ git \
gettext \ gettext \
unixODBC-devel \ unixODBC-devel \
zlib-devel" && \ zlib-devel" && \
microdnf -y module enable \
--disablerepo "*" \
--enablerepo "ol9_appstream" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
postgresql:16 && \
microdnf -y install \ microdnf -y install \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "ol10_baseos_latest" \ --enablerepo "ol9_baseos_latest" \
--enablerepo "ol10_appstream" \ --enablerepo "ol9_appstream" \
--enablerepo "ol10_codeready_builder" \ --enablerepo "ol9_codeready_builder" \
--enablerepo="ol10_u0_developer_EPEL" \ --enablerepo="ol9_developer_EPEL" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--setopt=keepcache=0 \ --setopt=keepcache=0 \
--best \ --best \

View File

@ -1,6 +0,0 @@
[ol10_u0_developer_EPEL]
name=Oracle Linux $releasever.0 EPEL Packages for Development ($basearch)
baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL10/0/developer/EPEL/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

View File

@ -0,0 +1,6 @@
[ol9_developer_EPEL]
name=Oracle Linux $releasever EPEL Packages for Development ($basearch)
baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL9/developer/EPEL/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

View File

@ -1,10 +1,10 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=registry.access.redhat.com/ubi10/ubi-minimal:10.1 ARG OS_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:9.5
FROM ${OS_BASE_IMAGE} FROM ${OS_BASE_IMAGE}
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG RELEASE=6 ARG RELEASE=0
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ENV TERM=xterm \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} \ ZBX_VERSION=${ZBX_VERSION} \
@ -41,39 +41,44 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
gcc \ gcc \
go-toolset \ go-toolset \
patch \ patch \
c-ares-devel \
pcre2-devel \ pcre2-devel \
libcurl-devel \ libcurl-devel \
libevent-devel \ libevent-devel \
libssh-devel \ libssh-devel \
# libmodbus-devel \ libmodbus-devel \
libxml2-devel \ libxml2-devel \
openssl-devel \ openssl-devel \
openldap-devel \ openldap-devel \
make \ make \
mysql8.4-devel \ mysql-devel \
net-snmp-devel \ net-snmp-devel \
OpenIPMI-devel \ OpenIPMI-devel \
openldap-devel \ openldap-devel \
sqlite-devel \ sqlite-devel \
postgresql-private-devel \ postgresql-private-devel \
postgresql-server-devel \ postgresql-server-devel \
java-21-openjdk-devel \ java-17-openjdk-devel \
git \ git \
gettext \ gettext \
unixODBC-devel \ unixODBC-devel \
zlib-devel" && \ zlib-devel" && \
curl --tlsv1.2 -sSf -L https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm -o /tmp/epel-release-latest-10.noarch.rpm && \ curl --tlsv1.2 -sSf -L https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm -o /tmp/epel-release-latest-9.noarch.rpm && \
rpm -ivh /tmp/epel-release-latest-10.noarch.rpm && \ rpm -ivh /tmp/epel-release-latest-9.noarch.rpm && \
rm -rf /tmp/epel-release-latest-10.noarch.rpm && \ rm -rf /tmp/epel-release-latest-9.noarch.rpm && \
ARCH_SUFFIX="$(arch)"; \ ARCH_SUFFIX="$(arch)"; \
microdnf -y module enable \
--disablerepo "*" \
--enablerepo "rhel-9-for-$ARCH_SUFFIX-appstream-rpms" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
postgresql:16 && \
microdnf -y install \ microdnf -y install \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "ubi-10-baseos-rpms" \ --enablerepo "ubi-9-baseos-rpms" \
--enablerepo "ubi-10-appstream-rpms" \ --enablerepo "ubi-9-appstream-rpms" \
--enablerepo "rhel-10-for-$ARCH_SUFFIX-baseos-rpms" \ --enablerepo "rhel-9-for-$ARCH_SUFFIX-baseos-rpms" \
--enablerepo "rhel-10-for-$ARCH_SUFFIX-appstream-rpms" \ --enablerepo "rhel-9-for-$ARCH_SUFFIX-appstream-rpms" \
--enablerepo "codeready-builder-for-rhel-10-$ARCH_SUFFIX-rpms" \ --enablerepo "codeready-builder-for-rhel-9-$ARCH_SUFFIX-rpms" \
--enablerepo "epel" \ --enablerepo "epel" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--setopt=keepcache=0 \ --setopt=keepcache=0 \

View File

@ -3,7 +3,7 @@ ARG OS_BASE_IMAGE=ubuntu:noble
FROM ${OS_BASE_IMAGE} FROM ${OS_BASE_IMAGE}
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ENV TERM=xterm \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} \ ZBX_VERSION=${ZBX_VERSION} \
@ -28,7 +28,6 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
curl \ curl \
gcc \ gcc \
libc6-dev \ libc6-dev \
libc-ares-dev \
libcurl4-openssl-dev \ libcurl4-openssl-dev \
libevent-dev \ libevent-dev \
libmodbus-dev \ libmodbus-dev \
@ -54,23 +53,4 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
apt-get -y update && \ apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \ DEBIAN_FRONTEND=noninteractive apt-get -y \
--no-install-recommends install \ --no-install-recommends install \
gpg \ ${INSTALL_PKGS}
dirmngr \
gpg-agent && \
DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \
echo "deb http://apt.postgresql.org/pub/repos/apt $DISTRIB_CODENAME-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
key='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8' && \
export GNUPGHOME="$(mktemp -d)" && \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" && \
gpg --batch --export "$key" > /etc/apt/trusted.gpg.d/postgresql.gpg && \
gpgconf --kill all && \
rm -rf "$GNUPGHOME" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
--no-install-recommends install \
${INSTALL_PKGS} && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
purge \
gpg \
dirmngr \
gpg-agent

View File

@ -1,148 +0,0 @@
cmake_minimum_required(VERSION 3.16)
project(libmodbus_win C)
option(MODBUS_ENABLE_RTU "Build RTU backend (modbus-rtu.c)" ON)
option(MODBUS_ENABLE_TCP "Build TCP backend (modbus-tcp.c)" ON)
option(MODBUS_FIX_MSVC_SOCKOPT_WARNINGS "Fix MSVC winsock C4133 warnings" ON)
set(SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src")
# --- 1) Prepare shim include dir (build-only includes live here) ---
set(SHIM_INC_DIR "${CMAKE_CURRENT_BINARY_DIR}/include")
file(MAKE_DIRECTORY "${SHIM_INC_DIR}")
# We expect config.h to exist in ${SRC_DIR}/config.h (you generate it via src/win32/configure.js)
if(NOT EXISTS "${SRC_DIR}/win32/config.h")
message(FATAL_ERROR
"config.h not found at ${SRC_DIR}/win32/config.h. "
"Run src/win32/configure.js and copy config.h into src/ before configuring with CMake.")
endif()
# --- 2) Generate shim modbus.h (static-friendly MODBUS_API) ---
file(READ "${SRC_DIR}/modbus.h" MODBUS_H_TXT)
set(MODBUS_API_BLOCK
"#if defined(_MSC_VER)
# if defined(DLLBUILD)
/* define DLLBUILD when building the DLL */
# define MODBUS_API __declspec(dllexport)
# else
# define MODBUS_API __declspec(dllimport)
# endif
#else
# define MODBUS_API
#endif")
set(MODBUS_API_BLOCK_REPL
"#if defined(_MSC_VER)
/* Static library: do NOT use dllimport/dllexport in public headers */
# if defined(DLLBUILD)
# define MODBUS_API __declspec(dllexport)
# else
# define MODBUS_API
# endif
#else
# define MODBUS_API
#endif")
string(REPLACE "${MODBUS_API_BLOCK}" "${MODBUS_API_BLOCK_REPL}" MODBUS_H_TXT "${MODBUS_H_TXT}")
file(WRITE "${SHIM_INC_DIR}/modbus.h" "${MODBUS_H_TXT}")
# Copy remaining headers needed to compile (build-only set includes private/config)
file(COPY "${SRC_DIR}/modbus-tcp.h" DESTINATION "${SHIM_INC_DIR}")
file(COPY "${SRC_DIR}/modbus-rtu.h" DESTINATION "${SHIM_INC_DIR}")
file(COPY "${SRC_DIR}/modbus-version.h" DESTINATION "${SHIM_INC_DIR}")
# Build-only headers required by .c files
file(COPY "${SRC_DIR}/win32/config.h" DESTINATION "${SHIM_INC_DIR}")
file(COPY "${SRC_DIR}/modbus-private.h" DESTINATION "${SHIM_INC_DIR}")
file(COPY "${SRC_DIR}/modbus-tcp-private.h" DESTINATION "${SHIM_INC_DIR}")
file(COPY "${SRC_DIR}/modbus-rtu-private.h" DESTINATION "${SHIM_INC_DIR}")
# --- 3) Generate shim sources (do not modify upstream sources on disk) ---
set(SHIM_SRC_DIR "${CMAKE_CURRENT_BINARY_DIR}/shim_src")
file(MAKE_DIRECTORY "${SHIM_SRC_DIR}")
function(make_shim_source in_file out_file)
file(READ "${in_file}" TXT)
# Force includes via include paths (so our shim headers win)
string(REPLACE "#include \"modbus.h\"" "#include <modbus.h>" TXT "${TXT}")
string(REPLACE "#include \"modbus-tcp.h\"" "#include <modbus-tcp.h>" TXT "${TXT}")
string(REPLACE "#include \"modbus-rtu.h\"" "#include <modbus-rtu.h>" TXT "${TXT}")
string(REPLACE "#include \"modbus-version.h\"" "#include <modbus-version.h>" TXT "${TXT}")
# Some files include private/config with quotes; route those too
string(REPLACE "#include \"config.h\"" "#include <config.h>" TXT "${TXT}")
string(REPLACE "#include \"modbus-private.h\"" "#include <modbus-private.h>" TXT "${TXT}")
string(REPLACE "#include \"modbus-tcp-private.h\"" "#include <modbus-tcp-private.h>" TXT "${TXT}")
string(REPLACE "#include \"modbus-rtu-private.h\"" "#include <modbus-rtu-private.h>" TXT "${TXT}")
# Optional: silence MSVC winsock setsockopt warnings (C4133)
# On Windows setsockopt expects const char* optval; libmodbus passes &int.
if (MSVC AND MODBUS_FIX_MSVC_SOCKOPT_WARNINGS)
string(REPLACE ", &option, sizeof(int))" ", (const char*)&option, sizeof(int))" TXT "${TXT}")
endif()
file(WRITE "${out_file}" "${TXT}")
endfunction()
# Base sources
make_shim_source("${SRC_DIR}/modbus.c" "${SHIM_SRC_DIR}/modbus.c")
make_shim_source("${SRC_DIR}/modbus-data.c" "${SHIM_SRC_DIR}/modbus-data.c")
set(MODBUS_SOURCES
"${SHIM_SRC_DIR}/modbus.c"
"${SHIM_SRC_DIR}/modbus-data.c"
)
if(MODBUS_ENABLE_TCP)
make_shim_source("${SRC_DIR}/modbus-tcp.c" "${SHIM_SRC_DIR}/modbus-tcp.c")
list(APPEND MODBUS_SOURCES "${SHIM_SRC_DIR}/modbus-tcp.c")
endif()
if(MODBUS_ENABLE_RTU)
make_shim_source("${SRC_DIR}/modbus-rtu.c" "${SHIM_SRC_DIR}/modbus-rtu.c")
list(APPEND MODBUS_SOURCES "${SHIM_SRC_DIR}/modbus-rtu.c")
endif()
add_library(modbus STATIC ${MODBUS_SOURCES})
# --- MSVC: silence WinSock signature warning (setsockopt wants const char*) ---
if (MSVC)
target_compile_options(modbus PRIVATE /wd4133)
endif()
# Use shim headers for build + consumers (PUBLIC), but we will INSTALL only public headers explicitly
target_include_directories(modbus
PUBLIC
"${SHIM_INC_DIR}"
)
if (WIN32)
target_link_libraries(modbus PUBLIC ws2_32)
endif()
# --- Install: only public headers (no config.h, no *-private.h) ---
include(GNUInstallDirs)
install(TARGETS modbus
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
)
set(PUBLIC_HEADERS
"${SHIM_INC_DIR}/modbus.h"
"${SHIM_INC_DIR}/modbus-version.h"
)
if(MODBUS_ENABLE_TCP)
list(APPEND PUBLIC_HEADERS "${SHIM_INC_DIR}/modbus-tcp.h")
endif()
if(MODBUS_ENABLE_RTU)
list(APPEND PUBLIC_HEADERS "${SHIM_INC_DIR}/modbus-rtu.h")
endif()
install(FILES ${PUBLIC_HEADERS}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
)

View File

@ -1,146 +1,42 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
# escape=` # escape=`
ARG OS_BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022 ARG OS_BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022
FROM ${OS_BASE_IMAGE}
ARG GIT_VERSION=2.52.0 ARG GIT_VERSION=2.47.1
ARG NASM_VERSION=3.01 ARG NASM_VERSION=2.16.03
ARG VS_BUILDTOOLS_VERSION=17 ARG VS_BUILDTOOLS_VERSION=17
ARG PWSH_VERSION=7.5.4
ARG PCRE2_VERSION=10.47 ARG PCRE2_VERSION=10.44
ARG OPENSSL_VERSION=3.5.4 ARG OPENSSL_VERSION=3.4.1
ARG LIBMODBUS_VERSION=3.1.11 ARG LIBMODBUS_VERSION=3.1.11
ARG ZLIB_VERSION=1.3.1 ARG ZLIB_VERSION=1.3.1
ARG CURL_VERSION=8.17.0 ARG CURL_VERSION=8.11.1
ARG BUILD_ARCH=x64
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
FROM ${OS_BASE_IMAGE} AS src
ARG GIT_VERSION
ARG NASM_VERSION
ARG VS_BUILDTOOLS_VERSION
ARG PWSH_VERSION
ARG PCRE2_VERSION
ARG OPENSSL_VERSION
ARG LIBMODBUS_VERSION
ARG ZLIB_VERSION
ARG CURL_VERSION
ARG GIT_URL=https://github.com/git-for-windows/git/releases/download/v$GIT_VERSION.windows.1/MinGit-$GIT_VERSION-64-bit.zip ARG GIT_URL=https://github.com/git-for-windows/git/releases/download/v$GIT_VERSION.windows.1/MinGit-$GIT_VERSION-64-bit.zip
ARG PERL_URL=https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/SP_54201_64bit/strawberry-perl-5.42.0.1-64bit-portable.zip ARG PERL_URL=https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/SP_54001_64bit_UCRT/strawberry-perl-5.40.0.1-64bit-portable.zip
ARG VS_BUILDTOOLS_URL=https://aka.ms/vs/$VS_BUILDTOOLS_VERSION/release/vs_buildtools.exe ARG VS_BUILDTOOLS_URL=https://aka.ms/vs/$VS_BUILDTOOLS_VERSION/release/vs_buildtools.exe
ARG NASM_URL=https://www.nasm.us/pub/nasm/releasebuilds/$NASM_VERSION/win64/nasm-$NASM_VERSION-win64.zip ARG NASM_URL=https://www.nasm.us/pub/nasm/releasebuilds/$NASM_VERSION/win64/nasm-$NASM_VERSION-installer-x64.exe
ARG PCRE2_URL=https://github.com/PCRE2Project/pcre2/releases/download/pcre2-$PCRE2_VERSION/pcre2-$PCRE2_VERSION.zip ARG PCRE2_URL=https://github.com/PhilipHazel/pcre2/releases/download/pcre2-$PCRE2_VERSION/pcre2-$PCRE2_VERSION.zip
ARG OPENSSL_URL=https://github.com/openssl/openssl/releases/download/openssl-$OPENSSL_VERSION/openssl-$OPENSSL_VERSION.tar.gz ARG OPENSSL_URL=https://github.com/openssl/openssl/releases/download/openssl-$OPENSSL_VERSION/openssl-$OPENSSL_VERSION.tar.gz
ARG LIBMODBUS_URL=https://github.com/stephane/libmodbus/archive/refs/tags/v$LIBMODBUS_VERSION.tar.gz ARG LIBMODBUS_URL=https://github.com/stephane/libmodbus/archive/refs/tags/v$LIBMODBUS_VERSION.tar.gz
ARG ZLIB_URL=https://zlib.net/zlib-$ZLIB_VERSION.tar.gz ARG ZLIB_URL=https://zlib.net/zlib-$ZLIB_VERSION.tar.gz
ARG CURL_URL=https://curl.se/download/curl-$CURL_VERSION.tar.gz ARG CURL_URL=https://curl.se/download/curl-$CURL_VERSION.tar.gz
ARG PWSH_URL=https://github.com/PowerShell/PowerShell/releases/download/v$PWSH_VERSION/PowerShell-$PWSH_VERSION-win-x64.zip
ADD --checksum=sha256:d74c183c86c77248ad50017c7f45bae8f88106a6cca5d87ad09917e1c6fb0784 $PCRE2_URL build_src\pcre2.zip
ADD --checksum=sha256:967311f84955316969bdb1d8d4b983718ef42338639c621ec4c34fddef355e99 $OPENSSL_URL build_src\openssl.tar.gz
ADD --checksum=sha256:15b4b2e0f68122c2da9b195de5c330489a9c97d40b4a95d2822378dc14d780e7 $LIBMODBUS_URL build_src\libmodbus.tar.gz
ADD --checksum=sha256:9A93B2B7DFDAC77CEBA5A558A580E74667DD6FEDE4585B91EEFB60F03B72DF23 $ZLIB_URL build_src\zlib.tar.gz
ADD --checksum=sha256:e8e74cdeefe5fb78b3ae6e90cd542babf788fa9480029cfcee6fd9ced42b7910 $CURL_URL build_src\curl.tar.gz
ADD --checksum=sha256:b40d192ae95ba6ccc4cc362ff4e1b18ca6fb5055bebbcd3920684e12701fa8f6 $PWSH_URL build_deps\pwsh.zip
ADD --checksum=sha256:f42a561840627747ad48e6ece05a14093292d31f3393a401a7f7c780ee7695c2 $GIT_URL build_deps\git.zip
ADD --checksum=sha256:a1cde185656cf307b51670eed69f648b9eff15b5c518cb136e027c628e650b71 $PERL_URL build_deps\perl.zip
ADD --checksum=sha256:e0ba5157007abc7b1a65118a96657a961ddf55f7e3f632ee035366dfce039ca4 $NASM_URL build_deps\nasm.zip
ADD $VS_BUILDTOOLS_URL build_deps\vs_buildtools.exe
COPY CMakeLists.txt build_src\libmodbus_project\
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
RUN Set-Location -Path $env:SystemDrive\.; `
`
$env:BUILD_SRC = [string]::Format('{0}\build_src', $env:SystemDrive); `
[Environment]::SetEnvironmentVariable('BUILD_SRC', $env:BUILD_SRC, [EnvironmentVariableTarget]::Machine); `
$env:BUILD_DEPS = [string]::Format('{0}\build_deps', $env:SystemDrive); `
[Environment]::SetEnvironmentVariable('BUILD_DEPS', $env:BUILD_DEPS, [EnvironmentVariableTarget]::Machine); `
`
Set-Location -Path $env:BUILD_DEPS; `
Write-Host 'Installing PowerShell...'; `
Expand-Archive `
-Path $env:BUILD_DEPS\pwsh.zip `
-DestinationPath $env:BUILD_DEPS\pwsh\.; `
Get-ChildItem -Path $env:BUILD_DEPS\pwsh -Directory | Where-Object { `
$_.Name -match '^(cs|de|es|fr|it|ja|ko|pl|pt-BR|ru|tr|zh-Hans|zh-Hant)$' `
} | Remove-Item -Recurse -Force; `
Get-ChildItem -Path $env:BUILD_DEPS\pwsh -Recurse -Include '*.xml' | Where-Object { $_.FullName -notmatch '\\en-US\\' } | Remove-Item -Force; `
Get-ChildItem -Path $env:BUILD_DEPS\pwsh -Recurse -Include '*.resources.dll' | Where-Object { $_.FullName -notmatch '\\en-US\\' } | Remove-Item -Force; `
`
Write-Host 'Installing NASM...'; `
Expand-Archive `
-Path $env:BUILD_DEPS\nasm.zip `
-DestinationPath $env:BUILD_DEPS\.; `
Rename-Item -Path $env:BUILD_DEPS\nasm-$env:NASM_VERSION -NewName $env:BUILD_DEPS\NASM; `
`
Write-Host 'Installing GIT...'; `
Expand-Archive `
-Path $env:BUILD_DEPS\git.zip `
-DestinationPath $env:BUILD_DEPS\git\.; `
`
Write-Host 'Installing Perl...'; `
Expand-Archive -Path $env:BUILD_DEPS\perl.zip -DestinationPath $env:BUILD_DEPS\perl\; `
Remove-Item -Force -Recurse $env:BUILD_DEPS\perl\c\; `
`
Set-Location -Path $env:BUILD_SRC; `
`
Write-Host 'Extracting PCRE2 archive ...'; `
Expand-Archive -Path $env:BUILD_SRC\pcre2.zip -DestinationPath $env:BUILD_SRC; `
Rename-Item -Path $env:BUILD_SRC\pcre2-$env:PCRE2_VERSION -NewName $env:BUILD_SRC\pcre2; `
New-Item -ItemType directory -Path "$env:BUILD_SRC\pcre2\build" | Out-Null; `
`
Write-Host 'Extracting OpenSSL archive ...'; `
tar -zxf $env:BUILD_SRC\openssl.tar.gz; `
Rename-Item -Path $env:BUILD_SRC\openssl-$env:OPENSSL_VERSION -NewName $env:BUILD_SRC\openssl; `
`
Write-Host 'Extracting Libmodbus archive ...'; `
tar -zxf $env:BUILD_SRC\libmodbus.tar.gz; `
Move-Item -Path $env:BUILD_SRC\libmodbus-$env:LIBMODBUS_VERSION\ -Destination $env:BUILD_SRC\libmodbus; `
Copy-Item $env:BUILD_SRC\libmodbus_project\CMakeLists.txt -Destination $env:BUILD_SRC\libmodbus\CMakeLists.txt; `
Remove-Item -Force -Recurse $env:BUILD_SRC\libmodbus_project\; `
`
Write-Host 'Extracting Zlib archive ...'; `
tar -zxf $env:BUILD_SRC\zlib.tar.gz; `
Move-Item -Path $env:BUILD_SRC\zlib-$env:ZLIB_VERSION\ -Destination $env:BUILD_SRC\zlib; `
`
Write-Host 'Extracting CURL archive ...'; `
tar -zxf $env:BUILD_SRC\curl.tar.gz; `
Move-Item -Path $env:BUILD_SRC\curl-$env:CURL_VERSION\ -Destination $env:BUILD_SRC\curl; `
`
Write-Host 'Removing downloaded...'; `
Remove-Item -Force -Recurse $env:BUILD_SRC\*.tar.gz; `
Remove-Item -Force -Recurse $env:BUILD_SRC\*.zip; `
Remove-Item -Force -Recurse $env:BUILD_DEPS\*.tar.gz; `
Remove-Item -Force -Recurse $env:BUILD_DEPS\*.zip;
FROM ${OS_BASE_IMAGE}
ARG GIT_VERSION
ARG NASM_VERSION
ARG VS_BUILDTOOLS_VERSION
ARG PCRE2_VERSION
ARG OPENSSL_VERSION
ARG LIBMODBUS_VERSION
ARG ZLIB_VERSION
ARG CURL_VERSION
ARG MAJOR_VERSION
ARG ZBX_VERSION
ENV ZBX_VERSION=$ZBX_VERSION ` ENV ZBX_VERSION=$ZBX_VERSION `
VS_BUILDTOOLS_VERSION=$VS_BUILDTOOLS_VERSION ` BUILD_ARCH=$BUILD_ARCH `
PCRE2_VERSION=$PCRE2_VERSION OPENSSL_VERSION=$OPENSSL_VERSION LIBMODBUS_VERSION=$LIBMODBUS_VERSION GIT_URL=$GIT_URL PERL_URL=$PERL_URL NASM_URL=$NASM_URL `
VS_BUILDTOOLS_URL=$VS_BUILDTOOLS_URL VS_BUILDTOOLS_VERSION=$VS_BUILDTOOLS_VERSION `
PCRE2_VERSION=$PCRE2_VERSION OPENSSL_VERSION=$OPENSSL_VERSION LIBMODBUS_VERSION=$LIBMODBUS_VERSION `
PCRE2_URL=$PCRE2_URL OPENSSL_URL=$OPENSSL_URL LIBMODBUS_URL=$LIBMODBUS_URL `
ZLIB_URL=$ZLIB_URL CURL_URL=$CURL_URL
LABEL org.opencontainers.image.title="Zabbix agent build base for Windows" ` LABEL org.opencontainers.image.title="Zabbix agent build base for Windows" `
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" ` org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" `
@ -151,36 +47,90 @@ LABEL org.opencontainers.image.title="Zabbix agent build base for Windows" `
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" ` org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" `
org.opencontainers.image.version="${ZBX_VERSION}" org.opencontainers.image.version="${ZBX_VERSION}"
COPY --from=src build_src build_src ADD --checksum=sha256:21c6f0523abfd37a2f5cc85879d0ff32723ab496347f0d20793df888ecec3957 $PCRE2_URL C:\pcre2.zip
COPY --from=src build_deps build_deps ADD --checksum=sha256:002a2d6b30b58bf4bea46c43bdd96365aaf8daa6c428782aa4feee06da197df3 $OPENSSL_URL C:\openssl.tar.gz
ADD --checksum=sha256:15b4b2e0f68122c2da9b195de5c330489a9c97d40b4a95d2822378dc14d780e7 $LIBMODBUS_URL C:\libmodbus.tar.gz
ADD --checksum=sha256:9A93B2B7DFDAC77CEBA5A558A580E74667DD6FEDE4585B91EEFB60F03B72DF23 $ZLIB_URL C:\zlib.tar.gz
ADD --checksum=sha256:a889ac9dbba3644271bd9d1302b5c22a088893719b72be3487bc3d401e5c4e80 $CURL_URL C:\curl.tar.gz
COPY modbus.vs16.* C:\build_src\libmodbus_project\
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
RUN Set-Location -Path $env:SystemDrive\.; ` RUN Set-Location -Path $env:SystemDrive\.; `
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
`
$env:PATH = [string]::Format('{0}\perl\perl\bin;{1}\NASM;{0}\git\cmd;{0}\git\mingw64\bin;{0}\git\usr\bin;', $env:SystemDrive, ${env:ProgramFiles}) + $env:PATH; `
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); `
` `
$env:BUILD_OUTPUT = [string]::Format('{0}\build_output', $env:SystemDrive); ` $env:BUILD_OUTPUT = [string]::Format('{0}\build_output', $env:SystemDrive); `
[Environment]::SetEnvironmentVariable('BUILD_OUTPUT', $env:BUILD_OUTPUT, [EnvironmentVariableTarget]::Machine); ` [Environment]::SetEnvironmentVariable('BUILD_OUTPUT', $env:BUILD_OUTPUT, [EnvironmentVariableTarget]::Machine); `
$env:BUILD_SRC = [string]::Format('{0}\build_src', $env:SystemDrive); ` $env:BUILD_SRC = [string]::Format('{0}\build_src', $env:SystemDrive); `
[Environment]::SetEnvironmentVariable('BUILD_SRC', $env:BUILD_SRC, [EnvironmentVariableTarget]::Machine); ` [Environment]::SetEnvironmentVariable('BUILD_SRC', $env:BUILD_SRC, [EnvironmentVariableTarget]::Machine); `
$env:BUILD_DEPS = [string]::Format('{0}\build_deps', $env:SystemDrive); `
[Environment]::SetEnvironmentVariable('BUILD_DEPS', $env:BUILD_DEPS, [EnvironmentVariableTarget]::Machine); `
`
$env:PATH = [string]::Format('{0}\perl\perl\bin;{0}\NASM;{0}\git\cmd;{0}\git\mingw64\bin;{0}\git\usr\bin;', $env:BUILD_DEPS) + $env:PATH; `
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); `
` `
New-Item -ItemType directory -Path $env:BUILD_OUTPUT -Force | Out-Null; ` New-Item -ItemType directory -Path $env:BUILD_OUTPUT -Force | Out-Null; `
New-Item -ItemType directory -Path $env:BUILD_SRC -Force | Out-Null; `
`
Write-Host ('Downloading {0} ...' -f $env:GIT_URL); `
Invoke-WebRequest -OutFile $env:TEMP\git.zip -Uri $env:GIT_URL; `
`
$sha256 = '50b04b55425b5c465d076cdb184f63a0cd0f86f6ec8bb4d5860114a713d2c29a'; `
$d_sha256 = (Get-FileHash $env:TEMP\git.zip -Algorithm sha256).Hash; `
Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); `
if ($d_sha256 -ne $sha256) { `
Write-Host ('Checksum GIT for Windows ({0}) failed!' -f $d_sha256); `
exit 1; `
}; `
`
Write-Host ('Downloading {0} ...' -f $env:NASM_URL); `
Invoke-WebRequest -OutFile $env:TEMP\nasm_installer.exe -Uri $env:NASM_URL; `
`
$sha256 = '657E1252676CFB26A008835C20A760F731C8E0414469A4ED0F83F0FB059CDD35'; `
$d_sha256 = (Get-FileHash $env:TEMP\nasm_installer.exe -Algorithm sha256).Hash; `
Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); `
if ((Get-FileHash $env:TEMP\nasm_installer.exe -Algorithm sha256).Hash -ne $sha256) { `
Write-Host ('Checksum NASM ({0}) failed!' -f $d_sha256); `
exit 1; `
}; `
`
Write-Host ('Downloading {0} ...' -f $env:PERL_URL); `
Invoke-WebRequest -OutFile $env:TEMP\perl.zip -Uri $env:PERL_URL; `
`
$sha256 = '754f3e2a8e473dc68d1540c7802fb166a025f35ef18960c4564a31f8b5933907'; `
$d_sha256 = (Get-FileHash $env:TEMP\perl.zip -Algorithm sha256).Hash; `
Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); `
if ($d_sha256 -ne $sha256) { `
Write-Host ('Checksum Strawberry Perl ({0}) failed!' -f $d_sha256); `
exit 1; `
}; `
`
Write-Host ('Downloading {0} ...' -f $env:VS_BUILDTOOLS_URL); `
Invoke-WebRequest -OutFile $env:TEMP\vs_buildtools.exe $env:VS_BUILDTOOLS_URL; `
`
Write-Host 'Installing GIT...'; `
Expand-Archive `
-Path $env:TEMP\git.zip `
-DestinationPath $env:SystemDrive\git\.; `
`
Write-Host 'Verifying install ("git version") ...'; ` Write-Host 'Verifying install ("git version") ...'; `
Write-Host $env:VS_BUILDTOOLS_VERSION; `
git version; ` git version; `
Write-Host 'Installing NASM...'; `
Start-Process `
-FilePath $env:TEMP\nasm_installer.exe `
-ArgumentList '/S' -Wait; `
` `
Write-Host 'Verifying install ("nasm -v") ...'; ` Write-Host 'Verifying install ("nasm -v") ...'; `
nasm -v; ` nasm -v; `
` `
Write-Host 'Verifying install ("perl -v") ...'; ` Write-Host 'Installing Perl...'; `
perl -v; ` Expand-Archive -Path $env:TEMP\perl.zip -DestinationPath $env:SystemDrive\perl\; `
Remove-Item -Force -Recurse $env:SystemDrive\perl\c\; `
`
Write-Host 'Verifying install ("perl -V") ...'; `
perl -V; `
` `
Write-Host ('{0} - Visual Studio components installing...' -f $(Get-Date -format 'u')); ` Write-Host ('{0} - Visual Studio components installing...' -f $(Get-Date -format 'u')); `
cmd /C start /w $env:BUILD_DEPS\vs_buildtools.exe ` cmd /C start /w $env:TEMP\vs_buildtools.exe `
--quiet ` --quiet `
--wait ` --wait `
--norestart ` --norestart `
@ -204,124 +154,134 @@ RUN Set-Location -Path $env:SystemDrive\.; `
Write-Host 'Visual Studio components installation cleanup'; ` Write-Host 'Visual Studio components installation cleanup'; `
Get-ChildItem -Path """${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer""" -Directory -Recurse | Remove-Item -Force -Recurse; ` Get-ChildItem -Path """${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer""" -Directory -Recurse | Remove-Item -Force -Recurse; `
` `
Write-Host 'Build environment is ready...'; Write-Host 'Build environment is ready...'; `
`
RUN Import-Module (Get-ChildItem $env:VS_PATH -Recurse -File -Filter Microsoft.VisualStudio.DevShell.dll).FullName; ` Set-Location -Path $env:BUILD_SRC; `
`
Write-Host 'Extracting PCRE2 archive ...'; `
Expand-Archive -Path $env:SystemDrive\pcre2.zip -DestinationPath $env:BUILD_SRC; `
Rename-Item -Path $env:BUILD_SRC\pcre2-$env:PCRE2_VERSION -NewName $env:BUILD_SRC\pcre2; `
New-Item -ItemType directory -Path "$env:BUILD_SRC\pcre2\build" | Out-Null; `
`
Write-Host 'Extracting OpenSSL archive ...'; `
tar -zxf $env:SystemDrive\openssl.tar.gz; `
Rename-Item -Path $env:BUILD_SRC\openssl-$env:OPENSSL_VERSION -NewName $env:BUILD_SRC\openssl; `
`
Write-Host 'Extracting Libmodbus archive ...'; `
tar -zxf $env:SystemDrive\libmodbus.tar.gz; `
Move-Item -Path $env:BUILD_SRC\libmodbus-$env:LIBMODBUS_VERSION\ -Destination $env:BUILD_SRC\libmodbus; `
Move-Item -Path $env:BUILD_SRC\libmodbus_project\* -Destination $env:BUILD_SRC\libmodbus\src\win32; `
`
Write-Host 'Extracting Zlib archive ...'; `
tar -zxf $env:SystemDrive\zlib.tar.gz; `
Move-Item -Path $env:BUILD_SRC\zlib-$env:ZLIB_VERSION\ -Destination $env:BUILD_SRC\zlib; `
`
Write-Host 'Extracting CURL archive ...'; `
tar -zxf $env:SystemDrive\curl.tar.gz; `
Move-Item -Path $env:BUILD_SRC\curl-$env:CURL_VERSION\ -Destination $env:BUILD_SRC\curl; `
`
Set-Location -Path $env:SystemDrive\.; `
`
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"""; ` Enter-VsDevShell -VsInstallPath $env:VS_PATH -SkipAutomaticLocation -DevCmdArguments """-arch=$env:BUILD_ARCH"""; `
` `
Write-Host 'Building Zlib library...'; ` Write-Host 'Building Zlib library...'; `
Set-Location -Path $env:SystemDrive\.; ` Set-Location -Path $env:BUILD_SRC\zlib; `
$env:CL = """$env:CL /MP"""; ` (Get-Content .\win32\Makefile.msc).replace('-MD', '-MT') | Set-Content .\win32\Makefile.msc; `
cmake -S $env:BUILD_SRC\zlib -B $env:BUILD_SRC\zlib\build ` set CL=/MP; `
-G """Visual Studio 17 2022""" ` nmake /S -f .\win32\Makefile.msc; `
-A x64 ` New-Item -ItemType directory -Path $env:BUILD_OUTPUT\zlib | Out-Null; `
-DBUILD_SHARED_LIBS=OFF ` New-Item -ItemType directory -Path $env:BUILD_OUTPUT\zlib\include | Out-Null; `
-DCMAKE_MSVC_RUNTIME_LIBRARY="""MultiThreaded$<$<CONFIG:Debug>:Debug>""" ` New-Item -ItemType directory -Path $env:BUILD_OUTPUT\zlib\lib | Out-Null; `
-DCMAKE_INSTALL_PREFIX="""$env:BUILD_OUTPUT\zlib"""; ` Copy-Item $env:BUILD_SRC\zlib\*.h -Destination $env:BUILD_OUTPUT\zlib\include; `
cmake --build $env:BUILD_SRC\zlib\build --config Release --parallel; ` Copy-Item $env:BUILD_SRC\zlib\zlib.lib -Destination $env:BUILD_OUTPUT\zlib\lib; `
cmake --install $env:BUILD_SRC\zlib\build --config Release; ` Copy-Item $env:BUILD_SRC\zlib\zlib.pdb -Destination $env:BUILD_OUTPUT\zlib\lib; `
Remove-Item -Path $env:BUILD_SRC\zlib\build -Force -Recurse; ` nmake /S -f .\win32\Makefile.msc clean | Out-Null; `
Write-Host 'Zlib is ready...'; Write-Host 'Zlib is ready...'; `
RUN Import-Module (Get-ChildItem $env:VS_PATH -Recurse -File -Filter Microsoft.VisualStudio.DevShell.dll).FullName; `
Enter-VsDevShell -VsInstallPath $env:VS_PATH -SkipAutomaticLocation -DevCmdArguments """-arch=x64"""; `
` `
Write-Host 'Building OpenSSL library...'; ` Write-Host 'Building OpenSSL library...'; `
Set-Location -Path $env:BUILD_SRC\openssl; ` Set-Location -Path $env:BUILD_SRC\openssl; `
$env:CL = """$env:CL /nologo /MP /MT /wd4267 /wd4244"""; `
$env:NMAKEFLAGS = """/nologo"""; `
perl $env:BUILD_SRC\openssl\Configure ` perl $env:BUILD_SRC\openssl\Configure `
VC-WIN64A ` VC-WIN64A `
no-capieng `
no-docs `
no-dgram `
no-dtls1-method `
no-dtls1_2-method `
no-gost `
no-shared ` no-shared `
no-srp `
no-tests `
no-ui-console ` no-ui-console `
no-winstore ` no-tests `
no-unit-test `
no-capieng `
--api=1.1.0 ` --api=1.1.0 `
--prefix=$env:BUILD_OUTPUT\openssl ` --prefix=$env:BUILD_OUTPUT\openssl `
--openssldir=$env:BUILD_OUTPUT\openssl_ssl; ` --openssldir=$env:BUILD_OUTPUT\openssl_ssl; `
nmake /S build_libs; ` set CL=/MP; `
nmake /S INSTALLDOCS=0 INSTALLHTML=0 install_dev; ` nmake /S build_sw; `
nmake /S install_dev; `
nmake /S clean | Out-Null; ` nmake /S clean | Out-Null; `
Write-Host 'OpenSSL is ready...'; Write-Host 'OpenSSL is ready...'; `
RUN Import-Module (Get-ChildItem $env:VS_PATH -Recurse -File -Filter Microsoft.VisualStudio.DevShell.dll).FullName; `
Enter-VsDevShell -VsInstallPath $env:VS_PATH -SkipAutomaticLocation -DevCmdArguments """-arch=x64"""; `
` `
Write-Host 'Building PCRE2 library ...'; ` Write-Host 'Building PCRE2 library ...'; `
Set-Location -Path $env:BUILD_SRC\pcre2; ` Set-Location -Path $env:BUILD_SRC\pcre2\build; `
$env:CL = """$env:CL /MP"""; ` cmake --log-level=ERROR `
cmake -S $env:BUILD_SRC\pcre2 -B $env:BUILD_SRC\pcre2\build ` -G 'Visual Studio 17 2022' `
-G """Visual Studio 17 2022""" ` -A $env:BUILD_ARCH `
-A x64 `
-DBUILD_SHARED_LIBS=OFF ` -DBUILD_SHARED_LIBS=OFF `
-DPCRE2_BUILD_TESTS=OFF ` -DPCRE2_BUILD_TESTS=OFF `
-DPCRE2_BUILD_PCRE2GREP=OFF ` -DCMAKE_C_FLAGS_RELEASE:string="""/MT""" ..; `
-DPCRE2_SUPPORT_JIT=OFF ` msbuild PCRE2.sln `
-DCMAKE_MSVC_RUNTIME_LIBRARY="""MultiThreaded$<$<CONFIG:Debug>:Debug>""" ` -maxcpucount:"""$env:NUMBER_OF_PROCESSORS""" `
-DCMAKE_INSTALL_PREFIX="""$env:BUILD_OUTPUT\pcre2"""; ` /verbosity:quiet `
/property:Configuration=Release `
/property:Platform=$env:BUILD_ARCH `
/target:pcre2-8-static; `
` `
cmake --build $env:BUILD_SRC\pcre2\build --config Release --parallel; ` New-Item -ItemType directory -Path $env:BUILD_OUTPUT\pcre2 | Out-Null; `
cmake --install $env:BUILD_SRC\pcre2\build --config Release; ` New-Item -ItemType directory -Path $env:BUILD_OUTPUT\pcre2\include | Out-Null; `
New-Item -ItemType directory -Path $env:BUILD_OUTPUT\pcre2\lib | Out-Null; `
Copy-Item $env:BUILD_SRC\pcre2\build\*.h -Destination $env:BUILD_OUTPUT\pcre2\include; `
Copy-Item $env:BUILD_SRC\pcre2\build\Release\* -Destination $env:BUILD_OUTPUT\pcre2\lib; `
Remove-Item -Path $env:BUILD_SRC\pcre2\build\* -Force -Recurse; `
Write-Host 'PCRE2 is ready...'; `
` `
Remove-Item -Recurse -Force -Path $env:BUILD_OUTPUT\pcre2\share -ErrorAction SilentlyContinue; ` Write-Host 'Building Libmodbus library...'; `
Remove-Item -Recurse -Force $env:BUILD_SRC\pcre2\build; `
Write-Host 'PCRE2 is ready...';
RUN Import-Module (Get-ChildItem $env:VS_PATH -Recurse -File -Filter Microsoft.VisualStudio.DevShell.dll).FullName; `
Enter-VsDevShell -VsInstallPath $env:VS_PATH -SkipAutomaticLocation -DevCmdArguments """-arch=x64"""; `
` `
Write-Host 'Building Libmodbus library ...'; `
$env:CL = """$env:CL /MP"""; `
Set-Location -Path $env:BUILD_SRC\libmodbus\src\win32; ` Set-Location -Path $env:BUILD_SRC\libmodbus\src\win32; `
cscript //nologo .\configure.js; ` cscript .\configure.js; `
Set-Location -Path $env:BUILD_SRC\libmodbus; ` msbuild modbus.vs16.sln `
cmake -S $env:BUILD_SRC\libmodbus -B $env:BUILD_SRC\libmodbus\build ` -maxcpucount:"""$env:NUMBER_OF_PROCESSORS""" `
-G """"Visual Studio 17 2022""" ` /verbosity:quiet `
-A x64 ` /property:Configuration=Release `
-DBUILD_SHARED_LIBS=OFF ` /property:Platform=$env:BUILD_ARCH; `
-DCMAKE_MSVC_RUNTIME_LIBRARY="""MultiThreaded$<$<CONFIG:Debug>:Debug>""" ` `
-DCMAKE_INSTALL_PREFIX="""$env:BUILD_OUTPUT\libmodbus"""; ` New-Item -ItemType directory -Path $env:BUILD_OUTPUT\libmodbus | Out-Null; `
New-Item -ItemType directory -Path $env:BUILD_OUTPUT\libmodbus\include | Out-Null; `
New-Item -ItemType directory -Path $env:BUILD_OUTPUT\libmodbus\lib | Out-Null; `
Copy-Item $env:BUILD_SRC\libmodbus\src\*.h -Destination $env:BUILD_OUTPUT\libmodbus\include; `
Copy-Item $env:BUILD_SRC\libmodbus\src\win32\$env:BUILD_ARCH\Release\*.lib -Destination $env:BUILD_OUTPUT\libmodbus\lib; `
Copy-Item $env:BUILD_SRC\libmodbus\src\win32\$env:BUILD_ARCH\Release\*.pdb -Destination $env:BUILD_OUTPUT\libmodbus\lib; `
Remove-Item -Path $env:BUILD_SRC\libmodbus\src\win32\$env:BUILD_ARCH -Force -Recurse; `
Write-Host 'Libmodbus is ready...'; `
` `
cmake --build $env:BUILD_SRC\libmodbus\build --config Release --parallel; `
cmake --install $env:BUILD_SRC\libmodbus\build --config Release; `
Remove-Item -Recurse -Force $env:BUILD_SRC\libmodbus\build; `
Write-Host 'Libmodbus is ready...';
RUN Import-Module (Get-ChildItem $env:VS_PATH -Recurse -File -Filter Microsoft.VisualStudio.DevShell.dll).FullName; `
Enter-VsDevShell -VsInstallPath $env:VS_PATH -SkipAutomaticLocation -DevCmdArguments """-arch=x64"""; `
Write-Host 'Building Curl library...'; ` Write-Host 'Building Curl library...'; `
Set-Location -Path $env:BUILD_SRC\curl; ` Set-Location -Path $env:BUILD_SRC\curl\winbuild; `
$env:CL = """$env:CL /MP"""; ` (Get-Content MakefileBuild.vc).replace(' wldap32.lib', '') | Set-Content MakefileBuild.vc; `
cmake -S $env:BUILD_SRC\curl -B $env:BUILD_SRC\curl\build ` set CL=/MP; `
-G """Visual Studio 17 2022""" ` nmake /S -f Makefile.vc `
-A x64 ` mode=static `
-DCMAKE_MSVC_RUNTIME_LIBRARY="""MultiThreaded$<$<CONFIG:Debug>:Debug>""" ` VC=$env:VS_BUILDTOOLS_VERSION `
-DBUILD_CURL_EXE=OFF ` DEBUG=no `
-DBUILD_EXAMPLES=OFF ` CC="""cl.exe /DCURL_DISABLE_LDAP /DCURL_DISABLE_LDAPS""" `
-DBUILD_LIBCURL_DOCS=OFF ` MACHINE=$env:BUILD_ARCH `
-DBUILD_SHARED_LIBS=OFF ` USE_IPV6=yes `
-DBUILD_STATIC_LIBS=ON ` ENABLE_UNICODE=yes `
-DCURL_DISABLE_LDAP=ON ` USE_IDN=no `
-DCURL_DISABLE_LDAPS=ON ` GEN_PDB=no `
-DCURL_STATIC_CRT=ON ` WITH_SSL=static `
-DCURL_USE_LIBPSL=OFF ` SSL_PATH=$env:BUILD_OUTPUT\openssl `
-DCURL_USE_OPENSSL=ON ` WITH_ZLIB=static `
-DCURL_ZLIB=ON ` ZLIB_PATH=$env:BUILD_OUTPUT\zlib `
-DENABLE_UNICODE=ON ` RTLIBCFG=static; `
-DOPENSSL_ROOT_DIR="""$env:BUILD_OUTPUT\openssl""" ` `
-DOPENSSL_USE_STATIC_LIBS=ON ` Move-Item -Path $env:BUILD_SRC\curl\builds\libcurl-vc$env:VS_BUILDTOOLS_VERSION-$env:BUILD_ARCH-release-static-ssl-static-zlib-static-sspi\ -Destination $env:BUILD_OUTPUT\curl; `
-DUSE_WIN32_IDN=OFF ` Remove-Item -Path $env:BUILD_SRC\curl\builds\* -Force -Recurse; `
-DZLIB_INCLUDE_DIR="""$env:BUILD_OUTPUT\zlib\include""" ` Write-Host 'Curl is ready...'; `
-DZLIB_LIBRARY="""$env:BUILD_OUTPUT\zlib\lib\zlibstatic.lib""" ` `
-DZLIB_USE_STATIC_LIBS=ON ` Write-Host 'Removing downloaded...'; `
-DCMAKE_INSTALL_PREFIX="""$env:BUILD_OUTPUT\curl"""; ` Remove-Item -Force -Recurse $env:TEMP\*;
cmake --build $env:BUILD_SRC\curl\build --config Release --parallel; `
cmake --install $env:BUILD_SRC\curl\build --config Release; `
Remove-Item -Path $env:BUILD_SRC\curl\build\ -Force -Recurse;

View File

@ -1,123 +1,33 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
# escape=` # escape=`
ARG OS_BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022 ARG OS_BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022
FROM ${OS_BASE_IMAGE}
ARG PCRE2_VERSION=10.47 ARG PCRE2_VERSION=10.44
ARG OPENSSL_VERSION=3.5.4 ARG OPENSSL_VERSION=3.4.1
ARG GOLANG_VERSION=1.25.5 ARG GOLANG_VERSION=1.23.2
ARG VS_BUILDTOOLS_VERSION=17 ARG VS_BUILDTOOLS_VERSION=17
ARG PWSH_VERSION=7.5.4
ARG MSYSTEM=UCRT64 ARG MSYSTEM=UCRT64
ARG BUILD_ARCH=x64
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
FROM ${OS_BASE_IMAGE} as src ARG MINGW_URL=https://github.com/niXman/mingw-builds-binaries/releases/download/14.2.0-rt_v12-rev0/x86_64-14.2.0-release-win32-seh-ucrt-rt_v12-rev0.7z
ARG PCRE2_VERSION
ARG OPENSSL_VERSION
ARG GOLANG_VERSION
ARG VS_BUILDTOOLS_VERSION
ARG PWSH_VERSION
ARG MSYSTEM
ARG MINGW_URL=https://github.com/niXman/mingw-builds-binaries/releases/download/15.2.0-rt_v13-rev0/x86_64-15.2.0-release-win32-seh-ucrt-rt_v13-rev0.7z
ARG VS_BUILDTOOLS_URL=https://aka.ms/vs/$VS_BUILDTOOLS_VERSION/release/vs_buildtools.exe ARG VS_BUILDTOOLS_URL=https://aka.ms/vs/$VS_BUILDTOOLS_VERSION/release/vs_buildtools.exe
ARG GOLANG_URL=https://go.dev/dl/go$GOLANG_VERSION.windows-amd64.zip ARG GOLANG_URL=https://go.dev/dl/go$GOLANG_VERSION.windows-amd64.zip
ARG MSYS2_URL=https://github.com/msys2/msys2-installer/releases/download/2025-12-13/msys2-base-x86_64-20251213.sfx.exe ARG MSYS2_URL=https://api.github.com/repos/msys2/msys2-installer/releases/latest
ARG PCRE2_URL=https://github.com/PCRE2Project/pcre2/releases/download/pcre2-$PCRE2_VERSION/pcre2-$PCRE2_VERSION.zip ARG PCRE2_URL=https://github.com/PhilipHazel/pcre2/releases/download/pcre2-$PCRE2_VERSION/pcre2-$PCRE2_VERSION.zip
ARG OPENSSL_URL=https://github.com/openssl/openssl/releases/download/openssl-$OPENSSL_VERSION/openssl-$OPENSSL_VERSION.tar.gz ARG OPENSSL_URL=https://github.com/openssl/openssl/releases/download/openssl-$OPENSSL_VERSION/openssl-$OPENSSL_VERSION.tar.gz
ARG PWSH_URL=https://github.com/PowerShell/PowerShell/releases/download/v$PWSH_VERSION/PowerShell-$PWSH_VERSION-win-x64.zip
ADD --checksum=sha256:b40d192ae95ba6ccc4cc362ff4e1b18ca6fb5055bebbcd3920684e12701fa8f6 $PWSH_URL build_deps\pwsh.zip
ADD --checksum=sha256:ae756cce1cb80c819b4fe01b0353807178f532211b47f72d7fa77949de054ebb $GOLANG_URL build_deps\go_lang.zip
ADD --checksum=sha256:9e9f0b912a59d2cfb3ce5a01bae4e7a05e4be4f8ff89e36e0f57606ec525525d $MINGW_URL build_deps\mingw.7z
ADD --checksum=sha256:99f2fee9a7b1c344600ac97347e7be23a1f802d8d843b339ec7473a8ed8d49a6 $MSYS2_URL build_deps\msys2.sfx.exe
ADD $VS_BUILDTOOLS_URL build_deps\vs_buildtools.exe
ADD --checksum=sha256:d74c183c86c77248ad50017c7f45bae8f88106a6cca5d87ad09917e1c6fb0784 $PCRE2_URL build_src\pcre2.zip
ADD --checksum=sha256:967311f84955316969bdb1d8d4b983718ef42338639c621ec4c34fddef355e99 $OPENSSL_URL build_src\openssl.tar.gz
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
RUN $env:BUILD_SRC = [string]::Format('{0}\build_src', $env:SystemDrive); `
[Environment]::SetEnvironmentVariable('BUILD_SRC', $env:BUILD_SRC, [EnvironmentVariableTarget]::Machine); `
$env:BUILD_DEPS = [string]::Format('{0}\build_deps', $env:SystemDrive); `
[Environment]::SetEnvironmentVariable('BUILD_DEPS', $env:BUILD_DEPS, [EnvironmentVariableTarget]::Machine); `
`
$env:PATH = $env:PATH + [string]::Format(';{0}\mingw64\bin;{0}\go\bin;{0}\msys64\usr\bin;{0}\msys64\{1}\bin', $env:BUILD_DEPS, $env:MSYSTEM.ToLower()); `
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); `
`
Set-Location -Path $env:BUILD_DEPS; `
Write-Host 'Installing PowerShell...'; `
Expand-Archive `
-Path $env:BUILD_DEPS\pwsh.zip `
-DestinationPath $env:BUILD_DEPS\pwsh\.; `
Get-ChildItem -Path $env:BUILD_DEPS\pwsh -Directory | Where-Object { `
$_.Name -match '^(cs|de|es|fr|it|ja|ko|pl|pt-BR|ru|tr|zh-Hans|zh-Hant)$' `
} | Remove-Item -Recurse -Force; `
Get-ChildItem -Path $env:BUILD_DEPS\pwsh -Recurse -Include '*.xml' | Where-Object { $_.FullName -notmatch '\\en-US\\' } | Remove-Item -Force; `
Get-ChildItem -Path $env:BUILD_DEPS\pwsh -Recurse -Include '*.resources.dll' | Where-Object { $_.FullName -notmatch '\\en-US\\' } | Remove-Item -Force; `
`
Write-Host 'Installing MSYS2...'; `
& $env:BUILD_DEPS\msys2.sfx.exe -y -o"""$env:BUILD_DEPS\""" | Out-Null; `
bash -lc 'pacman --noprogressbar --noconfirm -Syuu'; `
bash -lc 'pacman --noprogressbar --noconfirm -Syuu'; `
bash -lc 'pacman --noprogressbar --sync --quiet --noconfirm mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-make mingw-w64-ucrt-x86_64-7zip git'; `
bash -lc 'pacman --noprogressbar --noconfirm -Scc'; `
bash -lc 'rm -rf /usr/share/man/* /usr/share/doc/* /usr/share/locale/*'; `
bash -lc 'rm -rf /$MSYSTEM/usr/share/man/* /$MSYSTEM/usr/share/doc/* /$MSYSTEM/usr/share/locale/*'; `
bash -lc 'rm -rf /$MSYSTEM/share/man/* /$MSYSTEM/share/doc/* /$MSYSTEM/share/locale/*'; `
bash -lc 'rm -rf /var/cache/pacman/pkg/*'; `
taskkill /F /FI 'MODULES eq msys-2.0.dll' | Out-Null; `
compact /c /i /s:$env:BUILD_DEPS\msys64 | Out-Null; `
`
Write-Host 'Installing Mingw-w64...'; `
7z x $env:BUILD_DEPS\mingw.7z; `
compact /c /i /s:$env:BUILD_DEPS\mingw64 | Out-Null; `
`
Write-Host 'Installing Go Lang...'; `
Expand-Archive -Path $env:BUILD_DEPS\go_lang.zip -DestinationPath $env:BUILD_DEPS; `
`
Set-Location -Path $env:BUILD_SRC; `
`
Write-Host 'Extracting PCRE2 archive ...'; `
Expand-Archive -Path $env:BUILD_SRC\pcre2.zip -DestinationPath $env:BUILD_SRC; `
Rename-Item -Path $env:BUILD_SRC\pcre2-$env:PCRE2_VERSION -NewName $env:BUILD_SRC\pcre2; `
`
Write-Host 'Extracting OpenSSL archive ...'; `
$env:SystemDirectory = [Environment]::SystemDirectory; `
tar -zxf "$env:BUILD_SRC\openssl.tar.gz"; `
Rename-Item -Path $env:BUILD_SRC\openssl-$env:OPENSSL_VERSION -NewName $env:BUILD_SRC\openssl; `
`
Write-Host 'Removing downloaded...'; `
Remove-Item -Force -Recurse $env:BUILD_SRC\*.tar.gz; `
Remove-Item -Force -Recurse $env:BUILD_SRC\*.zip; `
Remove-Item -Force -Recurse $env:BUILD_DEPS\*.tar.gz; `
Remove-Item -Force -Recurse $env:BUILD_DEPS\*.zip; `
Remove-Item -Force -Recurse $env:BUILD_DEPS\msys2.sfx.exe; `
Remove-Item -Force -Recurse $env:BUILD_DEPS\*.7z;
FROM ${OS_BASE_IMAGE}
ARG PCRE2_VERSION
ARG OPENSSL_VERSION
ARG GOLANG_VERSION
ARG VS_BUILDTOOLS_VERSION
ARG MSYSTEM
ARG MAJOR_VERSION
ARG ZBX_VERSION
ENV ZBX_VERSION=$ZBX_VERSION ` ENV ZBX_VERSION=$ZBX_VERSION `
VS_BUILDTOOLS_VERSION=$VS_BUILDTOOLS_VERSION GOLANG_VERSION=$GOLANG_VERSION ` BUILD_ARCH=$BUILD_ARCH `
MINGW_URL=$MINGW_URL VS_BUILDTOOLS_URL=$VS_BUILDTOOLS_URL VS_BUILDTOOLS_VERSION=$VS_BUILDTOOLS_VERSION GOLANG_VERSION=$GOLANG_VERSION MSYS2_URL=$MSYS2_URL `
PCRE2_VERSION=$PCRE2_VERSION OPENSSL_VERSION=$OPENSSL_VERSION ` PCRE2_VERSION=$PCRE2_VERSION OPENSSL_VERSION=$OPENSSL_VERSION `
PCRE2_URL=$PCRE2_URL OPENSSL_URL=$OPENSSL_URL `
CHERE_INVOKING=yes MSYSTEM=$MSYSTEM CHERE_INVOKING=yes MSYSTEM=$MSYSTEM
LABEL org.opencontainers.image.title="Zabbix agent 2 build base for Windows" ` LABEL org.opencontainers.image.title="Zabbix agent 2 build base for Windows" `
@ -129,36 +39,95 @@ LABEL org.opencontainers.image.title="Zabbix agent 2 build base for Windows" `
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" ` org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" `
org.opencontainers.image.version="${ZBX_VERSION}" org.opencontainers.image.version="${ZBX_VERSION}"
COPY --from=src build_src build_src ADD --checksum=sha256:21c6f0523abfd37a2f5cc85879d0ff32723ab496347f0d20793df888ecec3957 $PCRE2_URL C:\pcre2.zip
COPY --from=src build_deps build_deps ADD --checksum=sha256:002a2d6b30b58bf4bea46c43bdd96365aaf8daa6c428782aa4feee06da197df3 $OPENSSL_URL C:\openssl.tar.gz
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
RUN Set-Location -Path $env:SystemDrive\.; ` RUN Set-Location -Path $env:SystemDrive\.; `
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
`
$env:PATH = $env:PATH + [string]::Format(';{0}\mingw64\bin;{0}\go\bin;{0}\msys64\usr\bin;{0}\msys64\{1}\bin', $env:SystemDrive, $env:MSYSTEM.ToLower()); `
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); `
` `
$env:BUILD_OUTPUT = [string]::Format('{0}\build_output', $env:SystemDrive); ` $env:BUILD_OUTPUT = [string]::Format('{0}\build_output', $env:SystemDrive); `
[Environment]::SetEnvironmentVariable('BUILD_OUTPUT', $env:BUILD_OUTPUT, [EnvironmentVariableTarget]::Machine); ` [Environment]::SetEnvironmentVariable('BUILD_OUTPUT', $env:BUILD_OUTPUT, [EnvironmentVariableTarget]::Machine); `
$env:BUILD_SRC = [string]::Format('{0}\build_src', $env:SystemDrive); ` $env:BUILD_SRC = [string]::Format('{0}\build_src', $env:SystemDrive); `
[Environment]::SetEnvironmentVariable('BUILD_SRC', $env:BUILD_SRC, [EnvironmentVariableTarget]::Machine); ` [Environment]::SetEnvironmentVariable('BUILD_SRC', $env:BUILD_SRC, [EnvironmentVariableTarget]::Machine); `
$env:BUILD_DEPS = [string]::Format('{0}\build_deps', $env:SystemDrive); `
[Environment]::SetEnvironmentVariable('BUILD_DEPS', $env:BUILD_DEPS, [EnvironmentVariableTarget]::Machine); `
`
$env:PATH = $env:PATH + [string]::Format(';{0}\mingw64\bin;{0}\go\bin;{0}\msys64\usr\bin;{0}\msys64\{1}\bin', $env:BUILD_DEPS, $env:MSYSTEM.ToLower()); `
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); `
` `
New-Item -ItemType directory -Path $env:BUILD_OUTPUT -Force | Out-Null; ` New-Item -ItemType directory -Path $env:BUILD_OUTPUT -Force | Out-Null; `
New-Item -ItemType directory -Path $env:BUILD_SRC -Force | Out-Null; `
`
Write-Host ('Downloading {0} ...' -f $env:GOLANG_URL); `
Invoke-WebRequest -OutFile $env:TEMP\go_lang.zip -Uri $env:GOLANG_URL; `
`
$sha256 = 'bc28fe3002cd65cec65d0e4f6000584dacb8c71bfaff8801dfb532855ca42513'; `
$d_sha256 = (Get-FileHash $env:TEMP\go_lang.zip -Algorithm sha256).Hash; `
Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); `
if ($d_sha256 -ne $sha256) { `
Write-Host ('Checksum Go Lang ({0}) failed!' -f $d_sha256); `
exit 1; `
}; `
`
Write-Host ('Downloading {0} ...' -f $env:MSYS2_URL); `
Invoke-WebRequest -OutFile $env:TEMP\msys2.sfx.exe -Uri $(Invoke-RestMethod -UseBasicParsing $env:MSYS2_URL | `
Select -ExpandProperty "assets" | `
Select -ExpandProperty "browser_download_url" | `
Select-String -Pattern '.sfx.exe$').ToString(); `
`
$sha256 = 'D96C53ECBFA4B9D81F6C58077965BB2E31472A8BDA4D4446EF8F45F9C601B11D'; `
$d_sha256 = (Get-FileHash $env:TEMP\msys2.sfx.exe -Algorithm sha256).Hash; `
Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); `
if ($d_sha256 -ne $sha256) { `
Write-Host ('Checksum MSYS2 ({0}) failed!' -f $d_sha256); `
# exit 1; `
}; `
`
Write-Host ('Downloading {0} ...' -f $env:MINGW_URL); `
Invoke-WebRequest -OutFile $env:TEMP\mingw.7z -Uri $env:MINGW_URL; `
`
$sha256 = 'd7270f76483aefe0c88f45284b374e27648dec59fb6f89ee2f5cb62f6a060082'; `
$d_sha256 = (Get-FileHash $env:TEMP\mingw.7z -Algorithm sha256).Hash; `
Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); `
if ($d_sha256 -ne $sha256) { `
Write-Host ('Checksum Mingw-w64 ({0}) failed!' -f $d_sha256); `
exit 1; `
}; `
`
Write-Host ('Downloading {0} ...' -f $env:VS_BUILDTOOLS_URL); `
Invoke-WebRequest -OutFile $env:TEMP\vs_buildtools.exe $env:VS_BUILDTOOLS_URL; `
`
Write-Host 'Installing Go Lang...'; `
Expand-Archive -Path $env:TEMP\go_lang.zip -DestinationPath $env:SystemDrive\; `
` `
Write-Host 'Verifying install ("go version") ...'; ` Write-Host 'Verifying install ("go version") ...'; `
go version; ` go version; `
` `
Write-Host 'Installing MSYS2...'; `
& $env:TEMP\msys2.sfx.exe -y -o"""$env:SystemDrive\""" | Out-Null; `
bash -lc 'pacman --noprogressbar --noconfirm -Syuu'; `
bash -lc 'pacman --noprogressbar --noconfirm -Syuu'; `
bash -lc 'pacman --noprogressbar --sync --quiet --noconfirm mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-make mingw-w64-ucrt-x86_64-7zip git'; `
bash -lc 'pacman --noprogressbar --noconfirm -Scc'; `
bash -lc 'rm -rf /usr/share/man/* /usr/share/doc/* /usr/share/locale/*'; `
bash -lc 'rm -rf /$MSYSTEM/usr/share/man/* /$MSYSTEM/usr/share/doc/* /$MSYSTEM/usr/share/locale/*'; `
bash -lc 'rm -rf /$MSYSTEM/share/man/* /$MSYSTEM/share/doc/* /$MSYSTEM/share/locale/*'; `
bash -lc 'rm -rf /var/cache/pacman/pkg/*'; `
taskkill /F /FI 'MODULES eq msys-2.0.dll' | Out-Null; `
compact /c /i /s:$env:SystemDrive\msys64 | Out-Null; `
`
Write-Host 'Verifying install ("bash --version") ...'; ` Write-Host 'Verifying install ("bash --version") ...'; `
bash --version; ` bash --version; `
` `
Write-Host 'Installing Mingw-w64...'; `
7z x $env:TEMP\mingw.7z; `
compact /c /i /s:$env:SystemDrive\mingw64 | Out-Null; `
`
Write-Host 'Verifying install ("gcc -v") ...'; ` Write-Host 'Verifying install ("gcc -v") ...'; `
gcc -v; ` gcc -v; `
` `
Write-Host ('{0} - Visual Studio components installing...' -f $(Get-Date -format 'u')); ` Write-Host ('{0} - Visual Studio components installing...' -f $(Get-Date -format 'u')); `
cmd /C start /w $env:BUILD_DEPS\vs_buildtools.exe ` cmd /C start /w $env:TEMP\vs_buildtools.exe `
--quiet ` --quiet `
--wait ` --wait `
--norestart ` --norestart `
@ -181,51 +150,54 @@ RUN Set-Location -Path $env:SystemDrive\.; `
Write-Host 'Visual Studio components installation cleanup'; ` Write-Host 'Visual Studio components installation cleanup'; `
Get-ChildItem -Path """${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer""" -Directory -Recurse | Remove-Item -Force -Recurse; ` Get-ChildItem -Path """${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer""" -Directory -Recurse | Remove-Item -Force -Recurse; `
` `
Write-Host 'Build environment is ready...'; Write-Host 'Build environment is ready...'; `
`
RUN Write-Host 'Building PCRE2 library ...'; ` Set-Location -Path $env:BUILD_SRC; `
`
Write-Host 'Extracting PCRE2 archive ...'; `
Expand-Archive -Path $env:SystemDrive\pcre2.zip -DestinationPath $env:BUILD_SRC; `
Rename-Item -Path $env:BUILD_SRC\pcre2-$env:PCRE2_VERSION -NewName $env:BUILD_SRC\pcre2; `
`
Write-Host 'Extracting OpenSSL archive ...'; `
$env:SystemDirectory = [Environment]::SystemDirectory; `
tar -zxf "$env:SystemDrive\openssl.tar.gz"; `
Rename-Item -Path $env:BUILD_SRC\openssl-$env:OPENSSL_VERSION -NewName $env:BUILD_SRC\openssl; `
`
Write-Host 'Building PCRE2 library ...'; `
Set-Location -Path $env:BUILD_SRC\pcre2; ` Set-Location -Path $env:BUILD_SRC\pcre2; `
cmake -S $env:BUILD_SRC\pcre2 -B $env:BUILD_SRC\pcre2\build ` cmake --log-level=ERROR `
-G 'MinGW Makefiles' ` -G 'MinGW Makefiles' `
-DBUILD_SHARED_LIBS=OFF ` -DBUILD_SHARED_LIBS=OFF `
-DBUILD_STATIC_LIBS=ON ` -DBUILD_STATIC_LIBS=ON `
-DPCRE2_DEBUG=OFF ` -DPCRE2_DEBUG=OFF `
-DPCRE2_BUILD_TESTS=OFF ` -DPCRE2_BUILD_TESTS=OFF `
-DPCRE2_BUILD_PCRE2GREP=OFF `
-DPCRE2_SUPPORT_JIT=OFF `
-DINSTALL_MSVC_PDB=OFF ` -DINSTALL_MSVC_PDB=OFF `
-DCMAKE_C_COMPILER=gcc ` -DCMAKE_C_COMPILER=gcc `
-DCMAKE_C_FLAGS='-O2 -g' ` -DCMAKE_C_FLAGS='-O2 -g' `
-DCMAKE_INSTALL_PREFIX="""$env:BUILD_OUTPUT\pcre2""" . ; ` -DCMAKE_INSTALL_PREFIX="""$env:BUILD_OUTPUT\pcre2""" . ; `
Set-Location -Path $env:BUILD_SRC\pcre2\build; `
mingw32-make -s -j"""$env:NUMBER_OF_PROCESSORS"""; ` mingw32-make -s -j"""$env:NUMBER_OF_PROCESSORS"""; `
mingw32-make -s -j"""$env:NUMBER_OF_PROCESSORS""" install; ` mingw32-make -s -j"""$env:NUMBER_OF_PROCESSORS""" install; `
mingw32-make -s clean | Out-Null; ` mingw32-make -s clean | Out-Null; `
Remove-Item -Recurse -Force -Path $env:BUILD_OUTPUT\pcre2\share -ErrorAction SilentlyContinue; ` Remove-Item -Path $env:BUILD_OUTPUT\pcre2\share -Force -Recurse; `
Write-Host 'PCRE2 is ready...'; Write-Host 'PCRE2 is ready...'; `
`
RUN Write-Host 'Building OpenSSL library...'; ` Write-Host 'Building OpenSSL library...'; `
Set-Location -Path $env:BUILD_SRC\openssl; ` Set-Location -Path $env:BUILD_SRC\openssl; `
perl Configure ` perl Configure `
mingw64 ` mingw64 `
no-capieng `
no-docs `
no-dgram `
no-dtls1-method `
no-dtls1_2-method `
no-gost `
no-shared ` no-shared `
no-srp `
no-tests `
no-ui-console ` no-ui-console `
no-winstore ` no-tests `
thread_scheme=winthreads ` no-unit-test `
no-capieng `
--api=1.1.0 ` --api=1.1.0 `
--libdir=lib ` --libdir=lib `
--prefix=$env:BUILD_OUTPUT/openssl ` --prefix=$env:BUILD_OUTPUT/openssl `
--openssldir=$env:BUILD_OUTPUT/openssl_ssl; ` --openssldir=$env:BUILD_OUTPUT/openssl_ssl; `
mingw32-make -s -j"""$env:NUMBER_OF_PROCESSORS""" build_libs; ` mingw32-make -s -j"""$env:NUMBER_OF_PROCESSORS""" build_sw; `
mingw32-make -s -j"""$env:NUMBER_OF_PROCESSORS""" install_dev; ` mingw32-make -s -j"""$env:NUMBER_OF_PROCESSORS""" install_dev; `
mingw32-make -s clean | Out-Null; ` mingw32-make -s clean | Out-Null; `
Write-Host 'OpenSSL is ready...'; ` Write-Host 'OpenSSL is ready...'; `
Write-Host 'Build environment is ready'; `
Write-Host 'Removing downloaded...'; `
Remove-Item -Force -Recurse $env:TEMP\*;

View File

@ -12,7 +12,7 @@ ARG MSYSTEM=CLANG64
ARG BUILD_ARCH=x64 ARG BUILD_ARCH=x64
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.0 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG VS_BUILDTOOLS_URL=https://aka.ms/vs/17/release/vs_buildtools.exe ARG VS_BUILDTOOLS_URL=https://aka.ms/vs/17/release/vs_buildtools.exe
ARG GOLANG_URL=https://go.dev/dl/go$GOLANG_VERSION.windows-amd64.zip ARG GOLANG_URL=https://go.dev/dl/go$GOLANG_VERSION.windows-amd64.zip

View File

@ -12,7 +12,7 @@ ARG MSYSTEM=MINGW64
ARG BUILD_ARCH=x64 ARG BUILD_ARCH=x64
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.0 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG MINGW_URL=https://github.com/niXman/mingw-builds-binaries/releases/download/14.2.0-rt_v12-rev0/x86_64-14.2.0-release-win32-seh-msvcrt-rt_v12-rev0.7z ARG MINGW_URL=https://github.com/niXman/mingw-builds-binaries/releases/download/14.2.0-rt_v12-rev0/x86_64-14.2.0-release-win32-seh-msvcrt-rt_v12-rev0.7z
ARG VS_BUILDTOOLS_URL=https://aka.ms/vs/17/release/vs_buildtools.exe ARG VS_BUILDTOOLS_URL=https://aka.ms/vs/17/release/vs_buildtools.exe

View File

@ -8,7 +8,7 @@ ARG GOLANG_VERSION=1.23.2
ARG BUILD_ARCH=x64 ARG BUILD_ARCH=x64
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.0 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG GIT_URL=https://github.com/git-for-windows/git/releases/download/v2.47.1.windows.1/MinGit-2.47.1-busybox-64-bit.zip ARG GIT_URL=https://github.com/git-for-windows/git/releases/download/v2.47.1.windows.1/MinGit-2.47.1-busybox-64-bit.zip

View File

@ -0,0 +1,31 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29613.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "modbus", "modbus.vs16.vcxproj", "{498E0845-C7F4-438B-8EDE-EF7FC9A74430}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{498E0845-C7F4-438B-8EDE-EF7FC9A74430}.Debug|x64.ActiveCfg = Debug|x64
{498E0845-C7F4-438B-8EDE-EF7FC9A74430}.Debug|x64.Build.0 = Debug|x64
{498E0845-C7F4-438B-8EDE-EF7FC9A74430}.Debug|x86.ActiveCfg = Debug|Win32
{498E0845-C7F4-438B-8EDE-EF7FC9A74430}.Debug|x86.Build.0 = Debug|Win32
{498E0845-C7F4-438B-8EDE-EF7FC9A74430}.Release|x64.ActiveCfg = Release|x64
{498E0845-C7F4-438B-8EDE-EF7FC9A74430}.Release|x64.Build.0 = Release|x64
{498E0845-C7F4-438B-8EDE-EF7FC9A74430}.Release|x86.ActiveCfg = Release|Win32
{498E0845-C7F4-438B-8EDE-EF7FC9A74430}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6CF51673-664F-4C9F-B3FE-991FF423F3B6}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,265 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>modbus</ProjectName>
<ProjectGuid>{498E0845-C7F4-438B-8EDE-EF7FC9A74430}</ProjectGuid>
<RootNamespace>modbus</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>16.0.29511.113</_ProjectFileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<EnableManagedIncrementalBuild>False</EnableManagedIncrementalBuild>
<LinkIncremental>false</LinkIncremental>
<GenerateManifest>true</GenerateManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<EnableManagedIncrementalBuild>False</EnableManagedIncrementalBuild>
<LinkIncremental>false</LinkIncremental>
<GenerateManifest>true</GenerateManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PreBuildEvent>
<Command />
</PreBuildEvent>
<CustomBuildStep>
<Message />
<Command />
</CustomBuildStep>
<ClCompile>
<Optimization>Disabled</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>.;..</AdditionalIncludeDirectories>
<PreprocessorDefinitions>W32DEBUG;HAVE_CONFIG_H;DLLBUILD;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NONSTDC_NO_DEPRECATE=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<ExceptionHandling />
<BasicRuntimeChecks>UninitializedLocalUsageCheck</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<FloatingPointModel>Fast</FloatingPointModel>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_MSC_VER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ResourceOutputFileName>$(SolutionDir)/modbus.res</ResourceOutputFileName>
</ResourceCompile>
<Link>
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<Version>
</Version>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateMapFile>true</GenerateMapFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress />
<DataExecutionPrevention />
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<PreBuildEvent>
<Command />
</PreBuildEvent>
<CustomBuildStep>
<Message />
<Command />
</CustomBuildStep>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>.;..</AdditionalIncludeDirectories>
<PreprocessorDefinitions>HAVE_CONFIG_H;DLLBUILD;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NONSTDC_NO_DEPRECATE=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling />
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>false</FunctionLevelLinking>
<FloatingPointModel>Fast</FloatingPointModel>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<StackReserveSize>1048576</StackReserveSize>
<StackCommitSize>524288</StackCommitSize>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<LinkTimeCodeGeneration />
<EntryPointSymbol />
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention />
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<PreBuildEvent>
<Command />
</PreBuildEvent>
<CustomBuildStep>
<Message />
<Command />
</CustomBuildStep>
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>.;..</AdditionalIncludeDirectories>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
<DisableSpecificWarnings>4244;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<PreprocessorDefinitions>W32DEBUG;_WINDLL;HAVE_CONFIG_H;DLLBUILD;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NONSTDC_NO_DEPRECATE=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<StackReserveSize>1048576</StackReserveSize>
<StackCommitSize>524288</StackCommitSize>
<TargetMachine>MachineX64</TargetMachine>
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<PreBuildEvent>
<Command />
</PreBuildEvent>
<CustomBuildStep>
<Message />
<Command />
</CustomBuildStep>
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>.;..</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
<DisableSpecificWarnings>4244;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<PreprocessorDefinitions>_WINDLL;HAVE_CONFIG_H;DLLBUILD;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NONSTDC_NO_DEPRECATE=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<StackReserveSize>1048576</StackReserveSize>
<StackCommitSize>524288</StackCommitSize>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<LinkTimeCodeGeneration />
<TargetMachine>MachineX64</TargetMachine>
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\modbus-data.c" />
<ClCompile Include="..\modbus-rtu.c" />
<ClCompile Include="..\modbus-tcp.c" />
<ClCompile Include="..\modbus.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\modbus-private.h" />
<ClInclude Include="..\modbus-rtu-private.h" />
<ClInclude Include="..\modbus-rtu.h" />
<ClInclude Include="..\modbus-tcp-private.h" />
<ClInclude Include="..\modbus-tcp.h" />
<ClInclude Include="..\modbus.h" />
<ClInclude Include="config.h" />
<ClInclude Include="modbus-version.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="modbus.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\modbus-data.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\modbus-rtu.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\modbus-tcp.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\modbus.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="config.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\modbus-private.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\modbus-rtu-private.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\modbus-rtu.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\modbus-tcp-private.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\modbus-tcp.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="modbus-version.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\modbus.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="modbus.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
</Project>

View File

@ -14,17 +14,17 @@ Zabbix build base (MySQL) image is used for building Zabbix components. It conta
# Zabbix build base (MySQL) images # Zabbix build base (MySQL) images
These are the only official Zabbix build base (MySQL) Docker images. They are based on Alpine Linux v3.23, Ubuntu 24.04 (noble), CentOS Stream 10 and Oracle Linux 10 images. The available versions of the image are: These are the only official Zabbix build base (MySQL) Docker images. They are based on Alpine Linux v3.21, Ubuntu 24.04 (noble), CentOS Stream 9 and Oracle Linux 9 images. The available versions of the image are:
Zabbix build base 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest)
Zabbix build base 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*)
Zabbix build base 6.0 (tags: alpine-6.0-latest, ubuntu-6.0-latest, ol-6.0-latest) Zabbix build base 6.0 (tags: alpine-6.0-latest, ubuntu-6.0-latest, ol-6.0-latest)
Zabbix build base 6.0.* (tags: alpine-6.0.*, ubuntu-6.0.*, ol-6.0.*) Zabbix build base 6.0.* (tags: alpine-6.0.*, ubuntu-6.0.*, ol-6.0.*)
Zabbix build base 7.0 (tags: alpine-7.0-latest, ubuntu-7.0-latest, ol-7.0-latest) Zabbix build base 7.0 (tags: alpine-7.0-latest, ubuntu-7.0-latest, ol-7.0-latest)
Zabbix build base 7.0.* (tags: alpine-7.0.*, ubuntu-7.0.*, ol-7.0.*) Zabbix build base 7.0.* (tags: alpine-7.0.*, ubuntu-7.0.*, ol-7.0.*)
Zabbix build base 7.2 (tags: alpine-7.2-latest, ubuntu-7.2-latest, ol-7.2-latest) Zabbix build base 7.2 (tags: alpine-7.2-latest, ubuntu-7.2-latest, ol-7.2-latest, alpine-latest, ubuntu-latest, ol-latest, latest)
Zabbix build base 7.2.* (tags: alpine-7.2.*, ubuntu-7.2.*, ol-7.2.*) Zabbix build base 7.2.* (tags: alpine-7.2.*, ubuntu-7.2.*, ol-7.2.*)
Zabbix build base 7.4 (tags: alpine-7.4-latest, ubuntu-7.4-latest, ol-7.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) Zabbix build base 7.4 (tags: alpine-trunk, ubuntu-trunk, ol-trunk)
Zabbix build base 7.4.* (tags: alpine-7.4.*, ubuntu-7.4.*, ol-7.4.*)
Zabbix build base 8.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk)
Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux.
@ -32,7 +32,7 @@ Images are updated when new releases are published. The image with ``latest`` ta
The image is used to build / compile Zabbix components. Components are prepared for usage in any other images. The image is used to build / compile Zabbix components. Components are prepared for usage in any other images.
The image uses [Zabbix build base](https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/build-base) image with prepared build environment as base image and build / compile Zabbix components only. The image uses [Zabbix build base](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) image with prepared build environment as base image and build / compile Zabbix components only.
# The image variants # The image variants
@ -66,7 +66,7 @@ Please see [the Docker installation documentation](https://docs.docker.com/insta
## Documentation ## Documentation
Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request.
## Issues ## Issues

View File

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-base:alpine-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-base:alpine-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -8,7 +8,7 @@ FROM ${BUILD_BASE_IMAGE} AS builder
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG GIT_BRANCH ARG GIT_BRANCH=master
ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
ARG CFLAGS ARG CFLAGS
@ -64,7 +64,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
cd ${ZBX_SOURCES_DIR} && \ cd ${ZBX_SOURCES_DIR} && \
for patch_filename in /tmp/patches/*.patch; do \ for patch_filename in /tmp/patches/*.patch; do \
if [ -f "$patch_filename" ]; then \ if [ -f "$patch_filename" ]; then \
patch -p1 < "$patch_filename"; \ patch -p1 < $patch_filename; \
fi \ fi \
done && \ done && \
zabbix_revision=`git rev-parse --short HEAD` && \ zabbix_revision=`git rev-parse --short HEAD` && \
@ -84,7 +84,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-proxy \ --enable-proxy \
--enable-server \ --enable-server \
--enable-webservice \ --enable-webservice \
--with-ares \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
--with-libmodbus \ --with-libmodbus \

View File

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-base:centos-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-base:centos-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -8,7 +8,7 @@ FROM ${BUILD_BASE_IMAGE} AS builder
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG GIT_BRANCH ARG GIT_BRANCH=master
ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
ARG CFLAGS ARG CFLAGS
@ -64,7 +64,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
cd ${ZBX_SOURCES_DIR} && \ cd ${ZBX_SOURCES_DIR} && \
for patch_filename in /tmp/patches/*.patch; do \ for patch_filename in /tmp/patches/*.patch; do \
if [ -f "$patch_filename" ]; then \ if [ -f "$patch_filename" ]; then \
patch -p1 < "$patch_filename"; \ patch -p1 < $patch_filename; \
fi \ fi \
done && \ done && \
zabbix_revision=`git rev-parse --short HEAD` && \ zabbix_revision=`git rev-parse --short HEAD` && \
@ -84,10 +84,9 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-proxy \ --enable-proxy \
--enable-server \ --enable-server \
--enable-webservice \ --enable-webservice \
--with-ares \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
# --with-libmodbus \ --with-libmodbus \
--with-libpcre2 \ --with-libpcre2 \
--with-libxml2 \ --with-libxml2 \
--with-${DB_TYPE} \ --with-${DB_TYPE} \

View File

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-base:ol-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-base:ol-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -8,7 +8,7 @@ FROM ${BUILD_BASE_IMAGE} AS builder
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG GIT_BRANCH ARG GIT_BRANCH=master
ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
ARG CFLAGS ARG CFLAGS
@ -64,7 +64,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
cd ${ZBX_SOURCES_DIR} && \ cd ${ZBX_SOURCES_DIR} && \
for patch_filename in /tmp/patches/*.patch; do \ for patch_filename in /tmp/patches/*.patch; do \
if [ -f "$patch_filename" ]; then \ if [ -f "$patch_filename" ]; then \
patch -p1 < "$patch_filename"; \ patch -p1 < $patch_filename; \
fi \ fi \
done && \ done && \
zabbix_revision=`git rev-parse --short HEAD` && \ zabbix_revision=`git rev-parse --short HEAD` && \
@ -84,10 +84,9 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-proxy \ --enable-proxy \
--enable-server \ --enable-server \
--enable-webservice \ --enable-webservice \
--with-ares \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
# --with-libmodbus \ --with-libmodbus \
--with-libpcre2 \ --with-libpcre2 \
--with-libxml2 \ --with-libxml2 \
--with-${DB_TYPE} \ --with-${DB_TYPE} \

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG RELEASE=6 ARG RELEASE=0
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-base:rhel-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-base:rhel-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -10,14 +10,14 @@ ARG MAJOR_VERSION
ARG RELEASE ARG RELEASE
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG GIT_BRANCH ARG GIT_BRANCH=master
ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
ARG CFLAGS ARG CFLAGS
LABEL description="Zabbix build base for MySQL based images" \ LABEL description="Zabbix build base for MySQL based images" \
maintainer="alexey.pustovalov@zabbix.com" \ maintainer="alexey.pustovalov@zabbix.com" \
name="zabbix/zabbix-build-mysql-74" \ name="zabbix/zabbix-build-mysql-trunk" \
release="${RELEASE}" \ release="${RELEASE}" \
summary="Zabbix build base (MySQL)" \ summary="Zabbix build base (MySQL)" \
url="https://www.zabbix.com/" \ url="https://www.zabbix.com/" \
@ -45,9 +45,9 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
RUN --mount=type=cache,target=/root/.cache/go-build/ \ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \ --mount=type=cache,target=/root/go/ \
--mount=from=sources,target=/tmp/src,z \ --mount=from=sources,target=/tmp/src \
--mount=type=bind,source=patches/,target=/tmp/patches,z \ --mount=type=bind,source=patches/,target=/tmp/patches \
--mount=from=config_templates,target=/tmp/conf,z \ --mount=from=config_templates,target=/tmp/conf \
set -eux && \ set -eux && \
cd /tmp/ && \ cd /tmp/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \ mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
@ -75,7 +75,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
cd ${ZBX_SOURCES_DIR} && \ cd ${ZBX_SOURCES_DIR} && \
for patch_filename in /tmp/patches/*.patch; do \ for patch_filename in /tmp/patches/*.patch; do \
if [ -f "$patch_filename" ]; then \ if [ -f "$patch_filename" ]; then \
patch -p1 < "$patch_filename"; \ patch -p1 < $patch_filename; \
fi \ fi \
done && \ done && \
zabbix_revision=`git rev-parse --short HEAD` && \ zabbix_revision=`git rev-parse --short HEAD` && \
@ -95,10 +95,9 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-proxy \ --enable-proxy \
--enable-server \ --enable-server \
--enable-webservice \ --enable-webservice \
--with-ares \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
# --with-libmodbus \ --with-libmodbus \
--with-libpcre2 \ --with-libpcre2 \
--with-libxml2 \ --with-libxml2 \
--with-${DB_TYPE} \ --with-${DB_TYPE} \

View File

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-base:ubuntu-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-base:ubuntu-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -8,7 +8,7 @@ FROM ${BUILD_BASE_IMAGE} AS builder
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG GIT_BRANCH ARG GIT_BRANCH=master
ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
ARG CFLAGS ARG CFLAGS
@ -64,7 +64,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
cd ${ZBX_SOURCES_DIR} && \ cd ${ZBX_SOURCES_DIR} && \
for patch_filename in /tmp/patches/*.patch; do \ for patch_filename in /tmp/patches/*.patch; do \
if [ -f "$patch_filename" ]; then \ if [ -f "$patch_filename" ]; then \
patch -p1 < "$patch_filename"; \ patch -p1 < $patch_filename; \
fi \ fi \
done && \ done && \
zabbix_revision=`git rev-parse --short HEAD` && \ zabbix_revision=`git rev-parse --short HEAD` && \
@ -84,7 +84,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-proxy \ --enable-proxy \
--enable-server \ --enable-server \
--enable-webservice \ --enable-webservice \
--with-ares \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
--with-libmodbus \ --with-libmodbus \

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
# escape=` # escape=`
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-base:ltsc2022-agent-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-base:ltsc2022-agent-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -11,7 +11,7 @@ ARG ZBX_VERSION
ARG ZABBIX_VERSION_RC_NUM=2400 ARG ZABBIX_VERSION_RC_NUM=2400
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG GIT_BRANCH ARG GIT_BRANCH=master
ENV ZBX_SOURCES=$ZBX_SOURCES MAJOR_VERSION=$MAJOR_VERSION ZBX_VERSION=$ZBX_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} `
ZABBIX_VERSION_RC_NUM=$ZABBIX_VERSION_RC_NUM ` ZABBIX_VERSION_RC_NUM=$ZABBIX_VERSION_RC_NUM `
@ -36,11 +36,11 @@ 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_src | Out-Null; `
New-Item -ItemType directory -Path $env:ZBX_OUTPUT_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\sbin | Out-Null; `
New-Item -ItemType directory -Path $env:ZBX_OUTPUT_DIR\bin | 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; ` 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; ` Import-Module (Get-ChildItem $env:VS_PATH -Recurse -File -Filter Microsoft.VisualStudio.DevShell.dll).FullName; `
Enter-VsDevShell -VsInstallPath $env:VS_PATH -SkipAutomaticLocation -DevCmdArguments """-arch=x64"""; ` 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); ` 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:ZBX_SOURCES_DIR; ` git -c advice.detachedHead=false clone $env:ZBX_SOURCES --branch $env:GIT_BRANCH --depth 1 --single-branch $env:ZBX_SOURCES_DIR; `
@ -50,7 +50,7 @@ RUN Set-Location -Path $env:SystemDrive\.; `
$ZbxRevision=(git rev-parse --short HEAD); ` $ZbxRevision=(git rev-parse --short HEAD); `
(Get-Content include/version.h).replace('{ZABBIX_REVISION}', $ZbxRevision) | Set-Content include/version.h; ` (Get-Content include/version.h).replace('{ZABBIX_REVISION}', $ZbxRevision) | Set-Content include/version.h; `
Set-Location -Path $env:ZBX_SOURCES_DIR\build\win32\project; ` Set-Location -Path $env:ZBX_SOURCES_DIR\build\win32\project; `
$env:CL = """$env:CL /MP /MT"""; ` set CL=/MP; `
nmake /S -f Makefile ` nmake /S -f Makefile `
CPU=$env:CPU_MODEL ` CPU=$env:CPU_MODEL `
CFLAGS="""/D CURL_STATICLIB /D HAVE_LIBCURL /I "$env:BUILD_OUTPUT\curl\include" /D ZABBIX_VERSION_REVISION=$ZbxRevision /D HAVE_LIBMODBUS_STATIC /D DEFAULT_CONFIG_FILE=$env:SystemDrive\zabbix\conf\zabbix_agentd.conf""" ` CFLAGS="""/D CURL_STATICLIB /D HAVE_LIBCURL /I "$env:BUILD_OUTPUT\curl\include" /D ZABBIX_VERSION_REVISION=$ZbxRevision /D HAVE_LIBMODBUS_STATIC /D DEFAULT_CONFIG_FILE=$env:SystemDrive\zabbix\conf\zabbix_agentd.conf""" `
@ -61,7 +61,7 @@ RUN Set-Location -Path $env:SystemDrive\.; `
TLSLIBDIR=$env:BUILD_OUTPUT\openssl\lib ` TLSLIBDIR=$env:BUILD_OUTPUT\openssl\lib `
MODBINCDIR=$env:BUILD_OUTPUT\libmodbus\include ` MODBINCDIR=$env:BUILD_OUTPUT\libmodbus\include `
MODBLIBDIR=$env:BUILD_OUTPUT\libmodbus\lib ` MODBLIBDIR=$env:BUILD_OUTPUT\libmodbus\lib `
LIBS="""$env:LIBS Crypt32.lib $env:BUILD_OUTPUT\curl\lib\libcurl.lib $env:BUILD_OUTPUT\zlib\lib\zlibstatic.lib""" ` LIBS="""$env:LIBS Crypt32.lib $env:BUILD_OUTPUT\curl\lib\libcurl_a.lib $env:BUILD_OUTPUT\zlib\lib\zlib.lib""" `
all; ` all; `
` `
Write-Host 'Verifying build ("zabbix_agentd.exe -V") ...'; ` Write-Host 'Verifying build ("zabbix_agentd.exe -V") ...'; `

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
# escape=` # escape=`
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-base:ltsc2022-agent2-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-base:ltsc2022-agent2-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -16,7 +16,7 @@ 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 MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git
ARG EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git ARG EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git
ARG NVIDIA_GPU_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/nvidia-gpu.git ARG NVIDIA_GPU_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/nvidia-gpu.git
ARG GIT_BRANCH ARG GIT_BRANCH=master
ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
@ -53,7 +53,7 @@ RUN Set-Location -Path $env:SystemDrive\.; `
New-Item -ItemType directory -Path $env:ZBX_OUTPUT_DIR\zabbix-agent2-plugin | 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; ` Import-Module (Get-ChildItem $env:VS_PATH -Recurse -File -Filter Microsoft.VisualStudio.DevShell.dll).FullName; `
Enter-VsDevShell -VsInstallPath $env:VS_PATH -SkipAutomaticLocation -DevCmdArguments """-arch=x64"""; ` 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); ` 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:ZBX_SOURCES_DIR; ` git -c advice.detachedHead=false clone $env:ZBX_SOURCES --branch $env:GIT_BRANCH --depth 1 --single-branch $env:ZBX_SOURCES_DIR; `

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
# escape=` # escape=`
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.0 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-base:ltsc2022-agent2-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-base:ltsc2022-agent2-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -9,14 +9,14 @@ FROM ${BUILD_BASE_IMAGE} AS builder
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.0 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG ZABBIX_VERSION_RC_NUM=2400 ARG ZABBIX_VERSION_RC_NUM=2400
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.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 POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git
ARG MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git ARG MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git
ARG EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git ARG EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git
ARG GIT_BRANCH ARG GIT_BRANCH=master
ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
# escape=` # escape=`
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.0 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-base:ltsc2022-agent2-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-base:ltsc2022-agent2-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -9,14 +9,14 @@ FROM ${BUILD_BASE_IMAGE} AS builder
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.0 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG ZABBIX_VERSION_RC_NUM=2400 ARG ZABBIX_VERSION_RC_NUM=2400
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.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 POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git
ARG MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git ARG MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git
ARG EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git ARG EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git
ARG GIT_BRANCH ARG GIT_BRANCH=master
ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}

View File

@ -14,17 +14,17 @@ Zabbix build base (PostgreSQL) image is used for building Zabbix components. It
# Zabbix build base (PostgreSQL) images # Zabbix build base (PostgreSQL) images
These are the only official Zabbix build base (PostgreSQL) Docker images. They are based on Alpine Linux v3.23, Ubuntu 24.04 (noble), CentOS Stream 10 and Oracle Linux 10 images. The available versions of the image are: These are the only official Zabbix build base (PostgreSQL) Docker images. They are based on Alpine Linux v3.21, Ubuntu 24.04 (noble), CentOS Stream 9 and Oracle Linux 9 images. The available versions of the image are:
Zabbix build base 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest)
Zabbix build base 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*)
Zabbix build base 6.0 (tags: alpine-6.0-latest, ubuntu-6.0-latest, ol-6.0-latest) Zabbix build base 6.0 (tags: alpine-6.0-latest, ubuntu-6.0-latest, ol-6.0-latest)
Zabbix build base 6.0.* (tags: alpine-6.0.*, ubuntu-6.0.*, ol-6.0.*) Zabbix build base 6.0.* (tags: alpine-6.0.*, ubuntu-6.0.*, ol-6.0.*)
Zabbix build base 7.0 (tags: alpine-7.0-latest, ubuntu-7.0-latest, ol-7.0-latest) Zabbix build base 7.0 (tags: alpine-7.0-latest, ubuntu-7.0-latest, ol-7.0-latest)
Zabbix build base 7.0.* (tags: alpine-7.0.*, ubuntu-7.0.*, ol-7.0.*) Zabbix build base 7.0.* (tags: alpine-7.0.*, ubuntu-7.0.*, ol-7.0.*)
Zabbix build base 7.2 (tags: alpine-7.2-latest, ubuntu-7.2-latest, ol-7.2-latest) Zabbix build base 7.2 (tags: alpine-7.2-latest, ubuntu-7.2-latest, ol-7.2-latest, alpine-latest, ubuntu-latest, ol-latest, latest)
Zabbix build base 7.2.* (tags: alpine-7.2.*, ubuntu-7.2.*, ol-7.2.*) Zabbix build base 7.2.* (tags: alpine-7.2.*, ubuntu-7.2.*, ol-7.2.*)
Zabbix build base 7.4 (tags: alpine-7.4-latest, ubuntu-7.4-latest, ol-7.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) Zabbix build base 7.4 (tags: alpine-trunk, ubuntu-trunk, ol-trunk)
Zabbix build base 7.4.* (tags: alpine-7.4.*, ubuntu-7.4.*, ol-7.4.*)
Zabbix build base 8.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk)
Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux.
@ -32,7 +32,7 @@ Images are updated when new releases are published. The image with ``latest`` ta
The image is used to build / compile Zabbix components. Components are prepared for usage in any other images. The image is used to build / compile Zabbix components. Components are prepared for usage in any other images.
The image uses [Zabbix build base](https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/build-base) image with prepared build environment as base image and build / compile Zabbix components only. The image uses [Zabbix build base](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) image with prepared build environment as base image and build / compile Zabbix components only.
# The image variants # The image variants
@ -66,7 +66,7 @@ Please see [the Docker installation documentation](https://docs.docker.com/insta
## Documentation ## Documentation
Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request.
## Issues ## Issues

View File

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-base:alpine-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-base:alpine-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -8,7 +8,7 @@ FROM ${BUILD_BASE_IMAGE} AS builder
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG GIT_BRANCH ARG GIT_BRANCH=master
ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
ARG CFLAGS ARG CFLAGS
@ -66,7 +66,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
cd ${ZBX_SOURCES_DIR} && \ cd ${ZBX_SOURCES_DIR} && \
for patch_filename in /tmp/patches/*.patch; do \ for patch_filename in /tmp/patches/*.patch; do \
if [ -f "$patch_filename" ]; then \ if [ -f "$patch_filename" ]; then \
patch -p1 < "$patch_filename"; \ patch -p1 < $patch_filename; \
fi \ fi \
done && \ done && \
zabbix_revision=`git rev-parse --short HEAD` && \ zabbix_revision=`git rev-parse --short HEAD` && \
@ -86,7 +86,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-proxy \ --enable-proxy \
--enable-server \ --enable-server \
--enable-webservice \ --enable-webservice \
--with-ares \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
--with-libmodbus \ --with-libmodbus \

View File

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-base:centos-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-base:centos-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -8,7 +8,7 @@ FROM ${BUILD_BASE_IMAGE} AS builder
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG GIT_BRANCH ARG GIT_BRANCH=master
ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
ARG CFLAGS ARG CFLAGS
@ -66,7 +66,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
cd ${ZBX_SOURCES_DIR} && \ cd ${ZBX_SOURCES_DIR} && \
for patch_filename in /tmp/patches/*.patch; do \ for patch_filename in /tmp/patches/*.patch; do \
if [ -f "$patch_filename" ]; then \ if [ -f "$patch_filename" ]; then \
patch -p1 < "$patch_filename"; \ patch -p1 < $patch_filename; \
fi \ fi \
done && \ done && \
zabbix_revision=`git rev-parse --short HEAD` && \ zabbix_revision=`git rev-parse --short HEAD` && \
@ -85,10 +85,9 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-proxy \ --enable-proxy \
--enable-server \ --enable-server \
--enable-webservice \ --enable-webservice \
--with-ares \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
# --with-libmodbus \ --with-libmodbus \
--with-libpcre2 \ --with-libpcre2 \
--with-libxml2 \ --with-libxml2 \
--with-${DB_TYPE} \ --with-${DB_TYPE} \

View File

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-base:ol-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-base:ol-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -8,7 +8,7 @@ FROM ${BUILD_BASE_IMAGE} AS builder
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG GIT_BRANCH ARG GIT_BRANCH=master
ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
ARG CFLAGS ARG CFLAGS
@ -66,7 +66,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
cd ${ZBX_SOURCES_DIR} && \ cd ${ZBX_SOURCES_DIR} && \
for patch_filename in /tmp/patches/*.patch; do \ for patch_filename in /tmp/patches/*.patch; do \
if [ -f "$patch_filename" ]; then \ if [ -f "$patch_filename" ]; then \
patch -p1 < "$patch_filename"; \ patch -p1 < $patch_filename; \
fi \ fi \
done && \ done && \
zabbix_revision=`git rev-parse --short HEAD` && \ zabbix_revision=`git rev-parse --short HEAD` && \
@ -86,10 +86,9 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-proxy \ --enable-proxy \
--enable-server \ --enable-server \
--enable-webservice \ --enable-webservice \
--with-ares \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
# --with-libmodbus \ --with-libmodbus \
--with-libpcre2 \ --with-libpcre2 \
--with-libxml2 \ --with-libxml2 \
--with-${DB_TYPE} \ --with-${DB_TYPE} \

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG RELEASE=6 ARG RELEASE=0
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-base:rhel-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-base:rhel-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -10,14 +10,14 @@ ARG MAJOR_VERSION
ARG RELEASE ARG RELEASE
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG GIT_BRANCH ARG GIT_BRANCH=master
ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
ARG CFLAGS ARG CFLAGS
LABEL description="Zabbix build base for PostgreSQL based images" \ LABEL description="Zabbix build base for PostgreSQL based images" \
maintainer="alexey.pustovalov@zabbix.com" \ maintainer="alexey.pustovalov@zabbix.com" \
name="zabbix/zabbix-build-pgsql-74" \ name="zabbix/zabbix-build-pgsql-trunk" \
release="${RELEASE}" \ release="${RELEASE}" \
summary="Zabbix build base (PostgreSQL)" \ summary="Zabbix build base (PostgreSQL)" \
url="https://www.zabbix.com/" \ url="https://www.zabbix.com/" \
@ -45,9 +45,9 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
RUN --mount=type=cache,target=/root/.cache/go-build/ \ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \ --mount=type=cache,target=/root/go/ \
--mount=from=sources,target=/tmp/src,z \ --mount=from=sources,target=/tmp/src \
--mount=type=bind,source=patches/,target=/tmp/patches,z \ --mount=type=bind,source=patches/,target=/tmp/patches \
--mount=from=config_templates,target=/tmp/conf,z \ --mount=from=config_templates,target=/tmp/conf \
set -eux && \ set -eux && \
cd /tmp/ && \ cd /tmp/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \ mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
@ -77,7 +77,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
cd ${ZBX_SOURCES_DIR} && \ cd ${ZBX_SOURCES_DIR} && \
for patch_filename in /tmp/patches/*.patch; do \ for patch_filename in /tmp/patches/*.patch; do \
if [ -f "$patch_filename" ]; then \ if [ -f "$patch_filename" ]; then \
patch -p1 < "$patch_filename"; \ patch -p1 < $patch_filename; \
fi \ fi \
done && \ done && \
zabbix_revision=`git rev-parse --short HEAD` && \ zabbix_revision=`git rev-parse --short HEAD` && \
@ -97,10 +97,9 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-proxy \ --enable-proxy \
--enable-server \ --enable-server \
--enable-webservice \ --enable-webservice \
--with-ares \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
# --with-libmodbus \ --with-libmodbus \
--with-libpcre2 \ --with-libpcre2 \
--with-libxml2 \ --with-libxml2 \
--with-${DB_TYPE} \ --with-${DB_TYPE} \

View File

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-base:ubuntu-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-base:ubuntu-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -8,7 +8,7 @@ FROM ${BUILD_BASE_IMAGE} AS builder
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG GIT_BRANCH ARG GIT_BRANCH=master
ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
ARG CFLAGS ARG CFLAGS
@ -66,7 +66,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
cd ${ZBX_SOURCES_DIR} && \ cd ${ZBX_SOURCES_DIR} && \
for patch_filename in /tmp/patches/*.patch; do \ for patch_filename in /tmp/patches/*.patch; do \
if [ -f "$patch_filename" ]; then \ if [ -f "$patch_filename" ]; then \
patch -p1 < "$patch_filename"; \ patch -p1 < $patch_filename; \
fi \ fi \
done && \ done && \
zabbix_revision=`git rev-parse --short HEAD` && \ zabbix_revision=`git rev-parse --short HEAD` && \
@ -85,7 +85,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-proxy \ --enable-proxy \
--enable-server \ --enable-server \
--enable-webservice \ --enable-webservice \
--with-ares \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
--with-libmodbus \ --with-libmodbus \

View File

@ -14,17 +14,17 @@ Zabbix build base (SQLite3) image is used for building Zabbix components. It con
# Zabbix build base (SQLite3) images # Zabbix build base (SQLite3) images
These are the only official Zabbix build base (SQLite3) Docker images. They are based on Alpine Linux v3.23, Ubuntu 24.04 (noble), CentOS Stream 10 and Oracle Linux 10 images. The available versions of the image are: These are the only official Zabbix build base (SQLite3) Docker images. They are based on Alpine Linux v3.21, Ubuntu 24.04 (noble), CentOS Stream 9 and Oracle Linux 9 images. The available versions of the image are:
Zabbix build base 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest)
Zabbix build base 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*)
Zabbix build base 6.0 (tags: alpine-6.0-latest, ubuntu-6.0-latest, ol-6.0-latest) Zabbix build base 6.0 (tags: alpine-6.0-latest, ubuntu-6.0-latest, ol-6.0-latest)
Zabbix build base 6.0.* (tags: alpine-6.0.*, ubuntu-6.0.*, ol-6.0.*) Zabbix build base 6.0.* (tags: alpine-6.0.*, ubuntu-6.0.*, ol-6.0.*)
Zabbix build base 7.0 (tags: alpine-7.0-latest, ubuntu-7.0-latest, ol-7.0-latest) Zabbix build base 7.0 (tags: alpine-7.0-latest, ubuntu-7.0-latest, ol-7.0-latest)
Zabbix build base 7.0.* (tags: alpine-7.0.*, ubuntu-7.0.*, ol-7.0.*) Zabbix build base 7.0.* (tags: alpine-7.0.*, ubuntu-7.0.*, ol-7.0.*)
Zabbix build base 7.2 (tags: alpine-7.2-latest, ubuntu-7.2-latest, ol-7.2-latest) Zabbix build base 7.2 (tags: alpine-7.2-latest, ubuntu-7.2-latest, ol-7.2-latest, alpine-latest, ubuntu-latest, ol-latest, latest)
Zabbix build base 7.2.* (tags: alpine-7.2.*, ubuntu-7.2.*, ol-7.2.*) Zabbix build base 7.2.* (tags: alpine-7.2.*, ubuntu-7.2.*, ol-7.2.*)
Zabbix build base 7.4 (tags: alpine-7.4-latest, ubuntu-7.4-latest, ol-7.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) Zabbix build base 7.4 (tags: alpine-trunk, ubuntu-trunk, ol-trunk)
Zabbix build base 7.4.* (tags: alpine-7.4.*, ubuntu-7.4.*, ol-7.4.*)
Zabbix build base 8.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk)
Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux.
@ -32,7 +32,7 @@ Images are updated when new releases are published. The image with ``latest`` ta
The image is used to build / compile Zabbix components. Components are prepared for usage in any other images. The image is used to build / compile Zabbix components. Components are prepared for usage in any other images.
The image uses [Zabbix build base](https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/build-base) image with prepared build environment as base image and build / compile Zabbix components only. The image uses [Zabbix build base](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) image with prepared build environment as base image and build / compile Zabbix components only.
It contains limited prepared Zabbix components while MySQL and PostgreSQL build base images contain all possible components: It contains limited prepared Zabbix components while MySQL and PostgreSQL build base images contain all possible components:
* zabbix-agent * zabbix-agent
@ -72,7 +72,7 @@ Please see [the Docker installation documentation](https://docs.docker.com/insta
## Documentation ## Documentation
Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request.
## Issues ## Issues

View File

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-base:alpine-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-base:alpine-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -8,7 +8,7 @@ FROM ${BUILD_BASE_IMAGE} AS builder
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG GIT_BRANCH ARG GIT_BRANCH=master
ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
ARG CFLAGS ARG CFLAGS
@ -58,7 +58,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
cd ${ZBX_SOURCES_DIR} && \ cd ${ZBX_SOURCES_DIR} && \
for patch_filename in /tmp/patches/*.patch; do \ for patch_filename in /tmp/patches/*.patch; do \
if [ -f "$patch_filename" ]; then \ if [ -f "$patch_filename" ]; then \
patch -p1 < "$patch_filename"; \ patch -p1 < $patch_filename; \
fi \ fi \
done && \ done && \
zabbix_revision=`git rev-parse --short HEAD` && \ zabbix_revision=`git rev-parse --short HEAD` && \
@ -76,7 +76,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-agent2 \ --enable-agent2 \
--enable-java \ --enable-java \
--enable-proxy \ --enable-proxy \
--with-ares \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
--with-libmodbus \ --with-libmodbus \

View File

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-base:centos-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-base:centos-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -8,7 +8,7 @@ FROM ${BUILD_BASE_IMAGE} AS builder
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG GIT_BRANCH ARG GIT_BRANCH=master
ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
ARG CFLAGS ARG CFLAGS
@ -58,7 +58,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
cd ${ZBX_SOURCES_DIR} && \ cd ${ZBX_SOURCES_DIR} && \
for patch_filename in /tmp/patches/*.patch; do \ for patch_filename in /tmp/patches/*.patch; do \
if [ -f "$patch_filename" ]; then \ if [ -f "$patch_filename" ]; then \
patch -p1 < "$patch_filename"; \ patch -p1 < $patch_filename; \
fi \ fi \
done && \ done && \
zabbix_revision=`git rev-parse --short HEAD` && \ zabbix_revision=`git rev-parse --short HEAD` && \
@ -76,10 +76,9 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-agent2 \ --enable-agent2 \
--enable-java \ --enable-java \
--enable-proxy \ --enable-proxy \
--with-ares \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
# --with-libmodbus \ --with-libmodbus \
--with-libpcre2 \ --with-libpcre2 \
--with-libxml2 \ --with-libxml2 \
--with-${DB_TYPE} \ --with-${DB_TYPE} \

View File

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-base:ol-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-base:ol-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -8,7 +8,7 @@ FROM ${BUILD_BASE_IMAGE} AS builder
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG GIT_BRANCH ARG GIT_BRANCH=master
ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
ARG CFLAGS ARG CFLAGS
@ -58,7 +58,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
cd ${ZBX_SOURCES_DIR} && \ cd ${ZBX_SOURCES_DIR} && \
for patch_filename in /tmp/patches/*.patch; do \ for patch_filename in /tmp/patches/*.patch; do \
if [ -f "$patch_filename" ]; then \ if [ -f "$patch_filename" ]; then \
patch -p1 < "$patch_filename"; \ patch -p1 < $patch_filename; \
fi \ fi \
done && \ done && \
zabbix_revision=`git rev-parse --short HEAD` && \ zabbix_revision=`git rev-parse --short HEAD` && \
@ -76,10 +76,9 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-agent2 \ --enable-agent2 \
--enable-java \ --enable-java \
--enable-proxy \ --enable-proxy \
--with-ares \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
# --with-libmodbus \ --with-libmodbus \
--with-libpcre2 \ --with-libpcre2 \
--with-libxml2 \ --with-libxml2 \
--with-${DB_TYPE} \ --with-${DB_TYPE} \

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG RELEASE=6 ARG RELEASE=0
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-base:rhel-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-base:rhel-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -10,14 +10,14 @@ ARG MAJOR_VERSION
ARG RELEASE ARG RELEASE
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG GIT_BRANCH ARG GIT_BRANCH=master
ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
ARG CFLAGS ARG CFLAGS
LABEL description="Zabbix build base for SQLite3 based images" \ LABEL description="Zabbix build base for SQLite3 based images" \
maintainer="alexey.pustovalov@zabbix.com" \ maintainer="alexey.pustovalov@zabbix.com" \
name="zabbix/zabbix-build-sqlite3-74" \ name="zabbix/zabbix-build-sqlite3-trunk" \
release="${RELEASE}" \ release="${RELEASE}" \
summary="Zabbix build base (SQLite3)" \ summary="Zabbix build base (SQLite3)" \
url="https://www.zabbix.com/" \ url="https://www.zabbix.com/" \
@ -69,7 +69,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
cd ${ZBX_SOURCES_DIR} && \ cd ${ZBX_SOURCES_DIR} && \
for patch_filename in /tmp/patches/*.patch; do \ for patch_filename in /tmp/patches/*.patch; do \
if [ -f "$patch_filename" ]; then \ if [ -f "$patch_filename" ]; then \
patch -p1 < "$patch_filename"; \ patch -p1 < $patch_filename; \
fi \ fi \
done && \ done && \
zabbix_revision=`git rev-parse --short HEAD` && \ zabbix_revision=`git rev-parse --short HEAD` && \
@ -87,10 +87,9 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-agent2 \ --enable-agent2 \
--enable-java \ --enable-java \
--enable-proxy \ --enable-proxy \
--with-ares \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
# --with-libmodbus \ --with-libmodbus \
--with-libpcre2 \ --with-libpcre2 \
--with-libxml2 \ --with-libxml2 \
--with-${DB_TYPE} \ --with-${DB_TYPE} \

View File

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-base:ubuntu-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-base:ubuntu-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -8,7 +8,7 @@ FROM ${BUILD_BASE_IMAGE} AS builder
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG GIT_BRANCH ARG GIT_BRANCH=master
ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION} ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
ARG CFLAGS ARG CFLAGS
@ -58,7 +58,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
cd ${ZBX_SOURCES_DIR} && \ cd ${ZBX_SOURCES_DIR} && \
for patch_filename in /tmp/patches/*.patch; do \ for patch_filename in /tmp/patches/*.patch; do \
if [ -f "$patch_filename" ]; then \ if [ -f "$patch_filename" ]; then \
patch -p1 < "$patch_filename"; \ patch -p1 < $patch_filename; \
fi \ fi \
done && \ done && \
zabbix_revision=`git rev-parse --short HEAD` && \ zabbix_revision=`git rev-parse --short HEAD` && \
@ -76,7 +76,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-agent2 \ --enable-agent2 \
--enable-java \ --enable-java \
--enable-proxy \ --enable-proxy \
--with-ares \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
--with-libmodbus \ --with-libmodbus \

View File

@ -14,17 +14,17 @@ Zabbix Java Gateway performs native support for monitoring JMX applications. Jav
# Zabbix Java Gateway images # Zabbix Java Gateway images
These are the only official Zabbix Java Gateway Docker images. They are based on Alpine Linux v3.23, Ubuntu 24.04 (noble), CentOS Stream 10 and Oracle Linux 10 images. The available versions of Zabbix Java Gateway are: These are the only official Zabbix Java Gateway Docker images. They are based on Alpine Linux v3.21, Ubuntu 24.04 (noble), CentOS Stream 9 and Oracle Linux 9 images. The available versions of Zabbix Java Gateway are:
Zabbix Java Gateway 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest)
Zabbix Java Gateway 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*)
Zabbix Java Gateway 6.0 (tags: alpine-6.0-latest, ubuntu-6.0-latest, ol-6.0-latest) Zabbix Java Gateway 6.0 (tags: alpine-6.0-latest, ubuntu-6.0-latest, ol-6.0-latest)
Zabbix Java Gateway 6.0.* (tags: alpine-6.0.*, ubuntu-6.0.*, ol-6.0.*) Zabbix Java Gateway 6.0.* (tags: alpine-6.0.*, ubuntu-6.0.*, ol-6.0.*)
Zabbix Java Gateway 7.0 (tags: alpine-7.0-latest, ubuntu-7.0-latest, ol-7.0-latest) Zabbix Java Gateway 7.0 (tags: alpine-7.0-latest, ubuntu-7.0-latest, ol-7.0-latest)
Zabbix Java Gateway 7.0.* (tags: alpine-7.0.*, ubuntu-7.0.*, ol-7.0.*) Zabbix Java Gateway 7.0.* (tags: alpine-7.0.*, ubuntu-7.0.*, ol-7.0.*)
Zabbix Java Gateway 7.2 (tags: alpine-7.2-latest, ubuntu-7.2-latest, ol-7.2-latest) Zabbix Java Gateway 7.2 (tags: alpine-7.2-latest, ubuntu-7.2-latest, ol-7.2-latest, alpine-latest, ubuntu-latest, ol-latest, latest)
Zabbix Java Gateway 7.2.* (tags: alpine-7.2.*, ubuntu-7.2.*, ol-7.2.*) Zabbix Java Gateway 7.2.* (tags: alpine-7.2.*, ubuntu-7.2.*, ol-7.2.*)
Zabbix Java Gateway 7.4 (tags: alpine-7.4-latest, ubuntu-7.4-latest, ol-7.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) Zabbix Java Gateway 7.2 (tags: alpine-trunk, ubuntu-trunk, ol-trunk)
Zabbix Java Gateway 7.4.* (tags: alpine-7.4.*, ubuntu-7.4.*, ol-7.4.*)
Zabbix Java Gateway 8.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk)
Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux.
@ -118,7 +118,7 @@ Please see [the Docker installation documentation](https://docs.docker.com/insta
## Documentation ## Documentation
Documentation for this image is stored in the [`java-gateway/` directory](https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/java-gateway) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/7.4/README.md) before attempting a pull request. Documentation for this image is stored in the [`java-gateway/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/java-gateway) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/trunk/README.md) before attempting a pull request.
## Issues ## Issues

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=alpine:3.23 ARG OS_BASE_IMAGE=alpine:3.21
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=quay.io/centos/centos:stream10-minimal ARG OS_BASE_IMAGE=quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -36,7 +36,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
set -eux && \ set -eux && \
INSTALL_PKGS="bash \ INSTALL_PKGS="bash \
shadow-utils \ shadow-utils \
java-21-openjdk-headless \ java-17-openjdk-headless \
findutils" && \ findutils" && \
microdnf -y install \ microdnf -y install \
--disablerepo "*" \ --disablerepo "*" \

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=container-registry.oracle.com/os/oraclelinux:10-slim ARG OS_BASE_IMAGE=oraclelinux:9-slim
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -35,12 +35,12 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--mount=type=tmpfs,target=/var/cache/yum/ \ --mount=type=tmpfs,target=/var/cache/yum/ \
set -eux && \ set -eux && \
INSTALL_PKGS="bash \ INSTALL_PKGS="bash \
java-21-openjdk-headless \ java-17-openjdk-headless \
findutils" && \ findutils" && \
microdnf -y install \ microdnf -y install \
--disablerepo="*" \ --disablerepo="*" \
--enablerepo="ol10_baseos_latest" \ --enablerepo="ol9_baseos_latest" \
--enablerepo="ol10_appstream" \ --enablerepo="ol9_appstream" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--setopt=keepcache=0 \ --setopt=keepcache=0 \
--best \ --best \

View File

@ -1,8 +1,8 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=registry.access.redhat.com/ubi10/ubi-minimal:10.1 ARG OS_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:9.5
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG RELEASE=6 ARG RELEASE=0
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -21,9 +21,9 @@ ENV TERM=xterm \
LABEL description="Zabbix Java Gateway performs native support for monitoring JMX applications" \ LABEL description="Zabbix Java Gateway performs native support for monitoring JMX applications" \
maintainer="alexey.pustovalov@zabbix.com" \ maintainer="alexey.pustovalov@zabbix.com" \
name="zabbix/zabbix-java-gateway-74" \ name="zabbix/zabbix-java-gateway-trunk" \
release="${RELEASE}" \ release="${RELEASE}" \
run="docker run --name zabbix-java-gateway -p 10052:10052 -d registry.connect.redhat.com/zabbix/zabbix-java-gateway-74:${ZBX_VERSION}" \ run="docker run --name zabbix-java-gateway -p 10052:10052 -d registry.connect.redhat.com/zabbix/zabbix-java-gateway-trunk:${ZBX_VERSION}" \
summary="Zabbix Java Gateway" \ summary="Zabbix Java Gateway" \
url="https://www.zabbix.com/" \ url="https://www.zabbix.com/" \
vendor="Zabbix SIA" \ vendor="Zabbix SIA" \
@ -34,7 +34,7 @@ LABEL description="Zabbix Java Gateway performs native support for monitoring JM
io.openshift.tags="gateway,zabbix-java,java" \ io.openshift.tags="gateway,zabbix-java,java" \
org.label-schema.build-date="${BUILD_DATE}" \ org.label-schema.build-date="${BUILD_DATE}" \
org.label-schema.description="Zabbix Java Gateway performs native support for monitoring JMX applications" \ org.label-schema.description="Zabbix Java Gateway performs native support for monitoring JMX applications" \
org.label-schema.docker.cmd="docker run --name zabbix-java-gateway -p 10052:10052 -d registry.connect.redhat.com/zabbix/zabbix-java-gateway-74:${ZBX_VERSION}" \ org.label-schema.docker.cmd="docker run --name zabbix-java-gateway -p 10052:10052 -d registry.connect.redhat.com/zabbix/zabbix-java-gateway-trunk:${ZBX_VERSION}" \
org.label-schema.license="AGPL v3.0" \ org.label-schema.license="AGPL v3.0" \
org.label-schema.name="zabbix-java-gateway-rhel" \ org.label-schema.name="zabbix-java-gateway-rhel" \
org.label-schema.schema-version="1.0" \ org.label-schema.schema-version="1.0" \
@ -56,12 +56,12 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
INSTALL_PKGS="bash \ INSTALL_PKGS="bash \
findutils \ findutils \
shadow-utils \ shadow-utils \
java-21-openjdk-headless" && \ java-17-openjdk-headless" && \
microdnf -y install \ microdnf -y install \
--disableplugin=subscription-manager \ --disableplugin=subscription-manager \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "ubi-10-baseos-rpms" \ --enablerepo "ubi-9-baseos-rpms" \
--enablerepo "ubi-10-appstream-rpms" \ --enablerepo "ubi-9-appstream-rpms" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--setopt=keepcache=0 \ --setopt=keepcache=0 \
--best \ --best \

View File

@ -38,7 +38,7 @@
<p>The volume allows include additional JAR files to extend allowed protocols for Zabbix Java Gateway.</p> <p>The volume allows include additional JAR files to extend allowed protocols for Zabbix Java Gateway.</p>
<h1 id="user-feedback">User Feedback</h1> <h1 id="user-feedback">User Feedback</h1>
<h2 id="documentation">Documentation</h2> <h2 id="documentation">Documentation</h2>
<p>Documentation for this image is stored in the <a href="https://github.com/zabbix/zabbix-docker/tree/Dockerfiles/7.4/java-gateway"><code>java-gateway/</code> directory</a> of the <a href="https://github.com/zabbix/zabbix-docker/"><code>zabbix/zabbix-docker</code> GitHub repo</a>. Be sure to familiarize yourself with the <a href="https://github.com/zabbix/zabbix-docker/blob/7.4/README.md">repository&#39;s <code>README.md</code> file</a> before attempting a pull request.</p> <p>Documentation for this image is stored in the <a href="https://github.com/zabbix/zabbix-docker/tree/Dockerfiles/trunk/java-gateway"><code>java-gateway/</code> directory</a> of the <a href="https://github.com/zabbix/zabbix-docker/"><code>zabbix/zabbix-docker</code> GitHub repo</a>. Be sure to familiarize yourself with the <a href="https://github.com/zabbix/zabbix-docker/blob/trunk/README.md">repository&#39;s <code>README.md</code> file</a> before attempting a pull request.</p>
<h2 id="issues">Issues</h2> <h2 id="issues">Issues</h2>
<p>If you have any problems with or questions about this image, please contact us through a <a href="https://github.com/zabbix/zabbix-docker/issues">GitHub issue</a>.</p> <p>If you have any problems with or questions about this image, please contact us through a <a href="https://github.com/zabbix/zabbix-docker/issues">GitHub issue</a>.</p>
<h3 id="known-issues">Known issues</h3> <h3 id="known-issues">Known issues</h3>

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=ubuntu:noble ARG OS_BASE_IMAGE=ubuntu:noble
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder

View File

@ -14,17 +14,17 @@ Zabbix proxy is a process that may collect monitoring data from one or more moni
# Zabbix proxy images # Zabbix proxy images
These are the only official Zabbix proxy Docker images. They are based on Alpine Linux v3.23, Ubuntu 24.04 (noble), CentOS Stream 10 and Oracle Linux 10 images. The available versions of Zabbix proxy are: These are the only official Zabbix proxy Docker images. They are based on Alpine Linux v3.21, Ubuntu 24.04 (noble), CentOS Stream 9 and Oracle Linux 9 images. The available versions of Zabbix proxy are:
Zabbix proxy 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest)
Zabbix proxy 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*)
Zabbix proxy 6.0 (tags: alpine-6.0-latest, ubuntu-6.0-latest, ol-6.0-latest) Zabbix proxy 6.0 (tags: alpine-6.0-latest, ubuntu-6.0-latest, ol-6.0-latest)
Zabbix proxy 6.0.* (tags: alpine-6.0.*, ubuntu-6.0.*, ol-6.0.*) Zabbix proxy 6.0.* (tags: alpine-6.0.*, ubuntu-6.0.*, ol-6.0.*)
Zabbix proxy 7.0 (tags: alpine-7.0-latest, ubuntu-7.0-latest, ol-7.0-latest) Zabbix proxy 7.0 (tags: alpine-7.0-latest, ubuntu-7.0-latest, ol-7.0-latest)
Zabbix proxy 7.0.* (tags: alpine-7.0.*, ubuntu-7.0.*, ol-7.0.*) Zabbix proxy 7.0.* (tags: alpine-7.0.*, ubuntu-7.0.*, ol-7.0.*)
Zabbix proxy 7.2 (tags: alpine-7.2-latest, ubuntu-7.2-latest, ol-7.2-latest) Zabbix proxy 7.2 (tags: alpine-7.2-latest, ubuntu-7.2-latest, ol-7.2-latest, alpine-latest, ubuntu-latest, ol-latest, latest)
Zabbix proxy 7.2.* (tags: alpine-7.2.*, ubuntu-7.2.*, ol-7.2.*) Zabbix proxy 7.2.* (tags: alpine-7.2.*, ubuntu-7.2.*, ol-7.2.*)
Zabbix proxy 7.4 (tags: alpine-7.4-latest, ubuntu-7.4-latest, ol-7.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) Zabbix proxy 7.2 (tags: alpine-trunk, ubuntu-trunk, ol-trunk)
Zabbix proxy 7.4.* (tags: alpine-7.4.*, ubuntu-7.4.*, ol-7.4.*)
Zabbix proxy 8.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk)
Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux.
@ -219,7 +219,6 @@ ZBX_UNREACHABLEPERIOD=45
ZBX_UNAVAILABLEDELAY=60 ZBX_UNAVAILABLEDELAY=60
ZBX_UNREACHABLEDELAY=15 ZBX_UNREACHABLEDELAY=15
ZBX_LOGSLOWQUERIES=3000 ZBX_LOGSLOWQUERIES=3000
ZBX_TLSLISTEN= # Available since 7.4.0
ZBX_TLSCONNECT=unencrypted ZBX_TLSCONNECT=unencrypted
ZBX_TLSACCEPT=unencrypted ZBX_TLSACCEPT=unencrypted
ZBX_TLSCAFILE= ZBX_TLSCAFILE=
@ -324,7 +323,7 @@ Please see [the Docker installation documentation](https://docs.docker.com/insta
## Documentation ## Documentation
Documentation for this image is stored in the [`proxy-mysql/` directory](https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/proxy-mysql) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/7.4/README.md) before attempting a pull request. Documentation for this image is stored in the [`proxy-mysql/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/proxy-mysql) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/trunk/README.md) before attempting a pull request.
## Issues ## Issues

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=alpine:3.23 ARG OS_BASE_IMAGE=alpine:3.21
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -16,7 +16,6 @@ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \ MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
NMAP_PRIVILEGED="" \ NMAP_PRIVILEGED="" \
MARIADB_TLS_DISABLE_PEER_VERIFICATION=1 \
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \ ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
ZABBIX_CONF_DIR="/etc/zabbix" ZABBIX_CONF_DIR="/etc/zabbix"
@ -51,10 +50,8 @@ RUN set -eux && \
tzdata \ tzdata \
traceroute \ traceroute \
nmap \ nmap \
krb5 \
iputils \ iputils \
openssl \ openssl \
c-ares \
libcap \ libcap \
libcurl \ libcurl \
libevent \ libevent \

View File

@ -160,12 +160,9 @@ file_process_from_env() {
# Check prerequisites for MySQL database # Check prerequisites for MySQL database
check_variables_mysql() { check_variables_mysql() {
if [ -n "${DB_SERVER_SOCKET}" ]; then if [ ! -n "${DB_SERVER_SOCKET}" ]; then
mysql_connect_args="-S ${DB_SERVER_SOCKET}"
else
: ${DB_SERVER_HOST:="mysql-server"} : ${DB_SERVER_HOST:="mysql-server"}
: ${DB_SERVER_PORT:="3306"} : ${DB_SERVER_PORT:="3306"}
mysql_connect_args="-h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT}"
fi fi
USE_DB_ROOT_USER=false USE_DB_ROOT_USER=false
@ -202,6 +199,11 @@ check_variables_mysql() {
DB_SERVER_DBNAME=${MYSQL_DATABASE:-"zabbix_proxy"} DB_SERVER_DBNAME=${MYSQL_DATABASE:-"zabbix_proxy"}
if [ ! -n "${DB_SERVER_SOCKET}" ]; then
mysql_connect_args="-h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT}"
else
mysql_connect_args="-S ${DB_SERVER_SOCKET}"
fi
} }
db_tls_params() { db_tls_params() {
@ -347,10 +349,11 @@ create_db_schema_mysql() {
} }
update_zbx_config() { update_zbx_config() {
test -z "${DB_SERVER_SOCKET}" || export ZBX_DB_SOCKET="${DB_SERVER_SOCKET}" export ZBX_DB_HOST="${DB_SERVER_HOST}"
test -z "${DB_SERVER_HOST}" || export ZBX_DB_HOST="${DB_SERVER_HOST}" export ZBX_DB_PORT="${DB_SERVER_PORT}"
test -z "${DB_SERVER_PORT}" || export ZBX_DB_PORT="${DB_SERVER_PORT}" if [ -n "${DB_SERVER_SOCKET}" ]; then
export ZBX_DB_SOCKET="${DB_SERVER_SOCKET}"
fi
export ZBX_DB_NAME="${DB_SERVER_DBNAME}" export ZBX_DB_NAME="${DB_SERVER_DBNAME}"
if [ -n "${ZBX_VAULT}" ] && [ -n "${ZBX_VAULTURL}" ] && [ ! -n "${ZBX_VAULTDBPATH}" ]; then if [ -n "${ZBX_VAULT}" ] && [ -n "${ZBX_VAULTURL}" ] && [ ! -n "${ZBX_VAULTDBPATH}" ]; then

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=quay.io/centos/centos:stream10-minimal ARG OS_BASE_IMAGE=quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -52,16 +52,13 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
libevent \ libevent \
traceroute \ traceroute \
nmap \ nmap \
krb5-workstation \
c-ares \
gzip \ gzip \
libssh \ libssh \
file-libs \ file-libs \
fping \ fping \
iputils \
libxml2 \ libxml2 \
mysql8.4 \ mysql \
mysql8.4-libs \ mysql-libs \
net-snmp-libs \ net-snmp-libs \
OpenIPMI-libs \ OpenIPMI-libs \
openldap \ openldap \

View File

@ -160,12 +160,9 @@ file_process_from_env() {
# Check prerequisites for MySQL database # Check prerequisites for MySQL database
check_variables_mysql() { check_variables_mysql() {
if [ -n "${DB_SERVER_SOCKET}" ]; then if [ ! -n "${DB_SERVER_SOCKET}" ]; then
mysql_connect_args="-S ${DB_SERVER_SOCKET}"
else
: ${DB_SERVER_HOST:="mysql-server"} : ${DB_SERVER_HOST:="mysql-server"}
: ${DB_SERVER_PORT:="3306"} : ${DB_SERVER_PORT:="3306"}
mysql_connect_args="-h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT}"
fi fi
USE_DB_ROOT_USER=false USE_DB_ROOT_USER=false
@ -202,6 +199,11 @@ check_variables_mysql() {
DB_SERVER_DBNAME=${MYSQL_DATABASE:-"zabbix_proxy"} DB_SERVER_DBNAME=${MYSQL_DATABASE:-"zabbix_proxy"}
if [ ! -n "${DB_SERVER_SOCKET}" ]; then
mysql_connect_args="-h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT}"
else
mysql_connect_args="-S ${DB_SERVER_SOCKET}"
fi
} }
db_tls_params() { db_tls_params() {
@ -344,10 +346,11 @@ create_db_schema_mysql() {
} }
update_zbx_config() { update_zbx_config() {
test -z "${DB_SERVER_SOCKET}" || export ZBX_DB_SOCKET="${DB_SERVER_SOCKET}" export ZBX_DB_HOST="${DB_SERVER_HOST}"
test -z "${DB_SERVER_HOST}" || export ZBX_DB_HOST="${DB_SERVER_HOST}" export ZBX_DB_PORT="${DB_SERVER_PORT}"
test -z "${DB_SERVER_PORT}" || export ZBX_DB_PORT="${DB_SERVER_PORT}" if [ -n "${DB_SERVER_SOCKET}" ]; then
export ZBX_DB_SOCKET="${DB_SERVER_SOCKET}"
fi
export ZBX_DB_NAME="${DB_SERVER_DBNAME}" export ZBX_DB_NAME="${DB_SERVER_DBNAME}"
if [ -n "${ZBX_VAULT}" ] && [ -n "${ZBX_VAULTURL}" ] && [ ! -n "${ZBX_VAULTDBPATH}" ]; then if [ -n "${ZBX_VAULT}" ] && [ -n "${ZBX_VAULTURL}" ] && [ ! -n "${ZBX_VAULTDBPATH}" ]; then

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=container-registry.oracle.com/os/oraclelinux:10-slim ARG OS_BASE_IMAGE=oraclelinux:9-slim
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -44,7 +44,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/sbin/zabbix_proxy"
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "${ZABBIX_CONF_DIR}/"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "${ZABBIX_CONF_DIR}/"]
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/database/mysql/", "/usr/share/doc/zabbix-proxy-mysql/"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/database/mysql/", "/usr/share/doc/zabbix-proxy-mysql/"]
COPY ["conf/etc/yum.repos.d/oracle-epel-ol10.repo", "/etc/yum.repos.d/oracle-epel-ol10.repo"] COPY ["conf/etc/yum.repos.d/oracle-epel-ol9.repo", "/etc/yum.repos.d/oracle-epel-ol9.repo"]
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--mount=type=tmpfs,target=/var/cache/yum/ \ --mount=type=tmpfs,target=/var/cache/yum/ \
@ -53,15 +53,12 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
libevent \ libevent \
traceroute \ traceroute \
nmap \ nmap \
krb5-workstation \
c-ares \
libssh \ libssh \
file-libs \ file-libs \
fping \ fping \
iputils \
libxml2 \ libxml2 \
mysql8.4 \ mysql \
mysql8.4-libs \ mysql-libs \
net-snmp-libs \ net-snmp-libs \
OpenIPMI-libs \ OpenIPMI-libs \
openldap \ openldap \
@ -73,10 +70,10 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
unixODBC" && \ unixODBC" && \
microdnf -y install \ microdnf -y install \
--disablerepo="*" \ --disablerepo="*" \
--enablerepo="ol10_baseos_latest" \ --enablerepo="ol9_baseos_latest" \
--enablerepo="ol10_appstream" \ --enablerepo="ol9_appstream" \
--enablerepo="ol10_codeready_builder" \ --enablerepo="ol9_codeready_builder" \
--enablerepo="ol10_u0_developer_EPEL" \ --enablerepo="ol9_developer_EPEL" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--setopt=keepcache=0 \ --setopt=keepcache=0 \
--best \ --best \

View File

@ -1,6 +0,0 @@
[ol10_u0_developer_EPEL]
name=Oracle Linux $releasever.0 EPEL Packages for Development ($basearch)
baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL10/0/developer/EPEL/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

View File

@ -0,0 +1,6 @@
[ol9_developer_EPEL]
name=Oracle Linux $releasever EPEL Packages for Development ($basearch)
baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL9/developer/EPEL/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

View File

@ -160,12 +160,9 @@ file_process_from_env() {
# Check prerequisites for MySQL database # Check prerequisites for MySQL database
check_variables_mysql() { check_variables_mysql() {
if [ -n "${DB_SERVER_SOCKET}" ]; then if [ ! -n "${DB_SERVER_SOCKET}" ]; then
mysql_connect_args="-S ${DB_SERVER_SOCKET}"
else
: ${DB_SERVER_HOST:="mysql-server"} : ${DB_SERVER_HOST:="mysql-server"}
: ${DB_SERVER_PORT:="3306"} : ${DB_SERVER_PORT:="3306"}
mysql_connect_args="-h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT}"
fi fi
USE_DB_ROOT_USER=false USE_DB_ROOT_USER=false
@ -202,6 +199,11 @@ check_variables_mysql() {
DB_SERVER_DBNAME=${MYSQL_DATABASE:-"zabbix_proxy"} DB_SERVER_DBNAME=${MYSQL_DATABASE:-"zabbix_proxy"}
if [ ! -n "${DB_SERVER_SOCKET}" ]; then
mysql_connect_args="-h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT}"
else
mysql_connect_args="-S ${DB_SERVER_SOCKET}"
fi
} }
db_tls_params() { db_tls_params() {
@ -344,10 +346,11 @@ create_db_schema_mysql() {
} }
update_zbx_config() { update_zbx_config() {
test -z "${DB_SERVER_SOCKET}" || export ZBX_DB_SOCKET="${DB_SERVER_SOCKET}" export ZBX_DB_HOST="${DB_SERVER_HOST}"
test -z "${DB_SERVER_HOST}" || export ZBX_DB_HOST="${DB_SERVER_HOST}" export ZBX_DB_PORT="${DB_SERVER_PORT}"
test -z "${DB_SERVER_PORT}" || export ZBX_DB_PORT="${DB_SERVER_PORT}" if [ -n "${DB_SERVER_SOCKET}" ]; then
export ZBX_DB_SOCKET="${DB_SERVER_SOCKET}"
fi
export ZBX_DB_NAME="${DB_SERVER_DBNAME}" export ZBX_DB_NAME="${DB_SERVER_DBNAME}"
if [ -n "${ZBX_VAULT}" ] && [ -n "${ZBX_VAULTURL}" ] && [ ! -n "${ZBX_VAULTDBPATH}" ]; then if [ -n "${ZBX_VAULT}" ] && [ -n "${ZBX_VAULTURL}" ] && [ ! -n "${ZBX_VAULTDBPATH}" ]; then

View File

@ -1,8 +1,8 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=registry.access.redhat.com/ubi10/ubi-minimal:10.1 ARG OS_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:9.5
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG RELEASE=6 ARG RELEASE=0
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -32,9 +32,9 @@ ENV ZBX_DB_NAME="dummy_db_name" \
LABEL description="Zabbix proxy with MySQL database support" \ LABEL description="Zabbix proxy with MySQL database support" \
maintainer="alexey.pustovalov@zabbix.com" \ maintainer="alexey.pustovalov@zabbix.com" \
name="zabbix/zabbix-proxy-mysql-74" \ name="zabbix/zabbix-proxy-mysql-trunk" \
release="${RELEASE}" \ release="${RELEASE}" \
run="docker run --name zabbix-proxy --link mysql-server:mysql-server -p 10051:10051 -d registry.connect.redhat.com/zabbix/zabbix-proxy-mysql-74:${ZBX_VERSION}" \ run="docker run --name zabbix-proxy --link mysql-server:mysql-server -p 10051:10051 -d registry.connect.redhat.com/zabbix/zabbix-proxy-mysql-trunk:${ZBX_VERSION}" \
summary="Zabbix proxy (MySQL)" \ summary="Zabbix proxy (MySQL)" \
url="https://www.zabbix.com/" \ url="https://www.zabbix.com/" \
vendor="Zabbix SIA" \ vendor="Zabbix SIA" \
@ -45,7 +45,7 @@ LABEL description="Zabbix proxy with MySQL database support" \
io.openshift.tags="zabbix,zabbix-proxy,mysql" \ io.openshift.tags="zabbix,zabbix-proxy,mysql" \
org.label-schema.build-date="${BUILD_DATE}" \ org.label-schema.build-date="${BUILD_DATE}" \
org.label-schema.description="Zabbix proxy with MySQL database support" \ org.label-schema.description="Zabbix proxy with MySQL database support" \
org.label-schema.docker.cmd="docker run --name zabbix-proxy --link mysql-server:mysql-server -p 10051:10051 -d registry.connect.redhat.com/zabbix/zabbix-proxy-mysql-74:${ZBX_VERSION}" \ org.label-schema.docker.cmd="docker run --name zabbix-proxy --link mysql-server:mysql-server -p 10051:10051 -d registry.connect.redhat.com/zabbix/zabbix-proxy-mysql-trunk:${ZBX_VERSION}" \
org.label-schema.license="AGPL v3.0" \ org.label-schema.license="AGPL v3.0" \
org.label-schema.name="zabbix-proxy-mysql-rhel" \ org.label-schema.name="zabbix-proxy-mysql-rhel" \
org.label-schema.schema-version="1.0" \ org.label-schema.schema-version="1.0" \
@ -71,8 +71,6 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
INSTALL_PKGS="bash \ INSTALL_PKGS="bash \
traceroute \ traceroute \
nmap \ nmap \
krb5-workstation \
c-ares \
shadow-utils \ shadow-utils \
fping \ fping \
iputils \ iputils \
@ -82,25 +80,25 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
openssl \ openssl \
libssh \ libssh \
libxml2 \ libxml2 \
mysql8.4 \ mysql \
mysql8.4-libs \ mysql-libs \
net-snmp-agent-libs \ net-snmp-agent-libs \
OpenIPMI-libs \ OpenIPMI-libs \
pcre2 \ pcre2 \
gzip \ gzip \
unixODBC \ unixODBC \
zlib" && \ zlib" && \
curl --tlsv1.2 -sSf -L https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm -o /tmp/epel-release-latest-10.noarch.rpm && \ curl --tlsv1.2 -sSf -L https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm -o /tmp/epel-release-latest-9.noarch.rpm && \
rpm -ivh /tmp/epel-release-latest-10.noarch.rpm && \ rpm -ivh /tmp/epel-release-latest-9.noarch.rpm && \
rm -rf /tmp/epel-release-latest-10.noarch.rpm && \ rm -rf /tmp/epel-release-latest-9.noarch.rpm && \
ARCH_SUFFIX="$(arch)"; \ ARCH_SUFFIX="$(arch)"; \
microdnf -y install \ microdnf -y install \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "ubi-10-baseos-rpms" \ --enablerepo "ubi-9-baseos-rpms" \
--enablerepo "ubi-10-appstream-rpms" \ --enablerepo "ubi-9-appstream-rpms" \
--enablerepo "rhel-10-for-$ARCH_SUFFIX-baseos-rpms" \ --enablerepo "rhel-9-for-$ARCH_SUFFIX-baseos-rpms" \
--enablerepo "rhel-10-for-$ARCH_SUFFIX-appstream-rpms" \ --enablerepo "rhel-9-for-$ARCH_SUFFIX-appstream-rpms" \
--enablerepo "codeready-builder-for-rhel-10-$ARCH_SUFFIX-rpms" \ --enablerepo "codeready-builder-for-rhel-9-$ARCH_SUFFIX-rpms" \
--enablerepo "epel" \ --enablerepo "epel" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--setopt=keepcache=0 \ --setopt=keepcache=0 \
@ -110,19 +108,19 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
microdnf -y update \ microdnf -y update \
--disableplugin=subscription-manager \ --disableplugin=subscription-manager \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "ubi-10-baseos-rpms" \ --enablerepo "ubi-9-baseos-rpms" \
--setopt=install_weak_deps=0 \
--best \
--setopt=tsflags=nodocs \
tzdata && \
microdnf -y reinstall \
--disableplugin=subscription-manager \
--disablerepo "*" \
--enablerepo "ubi-9-baseos-rpms" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--best \ --best \
--setopt=tsflags=nodocs \ --setopt=tsflags=nodocs \
tzdata && \ tzdata && \
# microdnf -y reinstall \
# --disableplugin=subscription-manager \
# --disablerepo "*" \
# --enablerepo "ubi-9-baseos-rpms" \
# --setopt=install_weak_deps=0 \
# --best \
# --setopt=tsflags=nodocs \
# tzdata && \
groupadd \ groupadd \
--system \ --system \
--gid 1995 \ --gid 1995 \

View File

@ -188,7 +188,7 @@ SNMP traps processing feature could be enabled using shared volume and switched
<p>The volume allows to add new MIB files. It does not support subdirectories, all MIBs must be placed to <code>/var/lib/zabbix/mibs</code>.</p> <p>The volume allows to add new MIB files. It does not support subdirectories, all MIBs must be placed to <code>/var/lib/zabbix/mibs</code>.</p>
<h1 id="user-feedback">User Feedback</h1> <h1 id="user-feedback">User Feedback</h1>
<h2 id="documentation">Documentation</h2> <h2 id="documentation">Documentation</h2>
<p>Documentation for this image is stored in the <a href="https://github.com/zabbix/zabbix-docker/tree/Dockerfiles/7.4/proxy-mysql"><code>proxy-mysql/</code> directory</a> of the <a href="https://github.com/zabbix/zabbix-docker/"><code>zabbix/zabbix-docker</code> GitHub repo</a>. Be sure to familiarize yourself with the <a href="https://github.com/zabbix/zabbix-docker/blob/7.4/README.md">repository&#39;s <code>README.md</code> file</a> before attempting a pull request.</p> <p>Documentation for this image is stored in the <a href="https://github.com/zabbix/zabbix-docker/tree/Dockerfiles/trunk/proxy-mysql"><code>proxy-mysql/</code> directory</a> of the <a href="https://github.com/zabbix/zabbix-docker/"><code>zabbix/zabbix-docker</code> GitHub repo</a>. Be sure to familiarize yourself with the <a href="https://github.com/zabbix/zabbix-docker/blob/trunk/README.md">repository&#39;s <code>README.md</code> file</a> before attempting a pull request.</p>
<h2 id="issues">Issues</h2> <h2 id="issues">Issues</h2>
<p>If you have any problems with or questions about this image, please contact us through a <a href="https://github.com/zabbix/zabbix-docker/issues">GitHub issue</a>.</p> <p>If you have any problems with or questions about this image, please contact us through a <a href="https://github.com/zabbix/zabbix-docker/issues">GitHub issue</a>.</p>
<h3 id="known-issues">Known issues</h3> <h3 id="known-issues">Known issues</h3>

View File

@ -160,12 +160,9 @@ file_process_from_env() {
# Check prerequisites for MySQL database # Check prerequisites for MySQL database
check_variables_mysql() { check_variables_mysql() {
if [ -n "${DB_SERVER_SOCKET}" ]; then if [ ! -n "${DB_SERVER_SOCKET}" ]; then
mysql_connect_args="-S ${DB_SERVER_SOCKET}"
else
: ${DB_SERVER_HOST:="mysql-server"} : ${DB_SERVER_HOST:="mysql-server"}
: ${DB_SERVER_PORT:="3306"} : ${DB_SERVER_PORT:="3306"}
mysql_connect_args="-h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT}"
fi fi
USE_DB_ROOT_USER=false USE_DB_ROOT_USER=false
@ -202,6 +199,11 @@ check_variables_mysql() {
DB_SERVER_DBNAME=${MYSQL_DATABASE:-"zabbix_proxy"} DB_SERVER_DBNAME=${MYSQL_DATABASE:-"zabbix_proxy"}
if [ ! -n "${DB_SERVER_SOCKET}" ]; then
mysql_connect_args="-h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT}"
else
mysql_connect_args="-S ${DB_SERVER_SOCKET}"
fi
} }
db_tls_params() { db_tls_params() {
@ -344,10 +346,11 @@ create_db_schema_mysql() {
} }
update_zbx_config() { update_zbx_config() {
test -z "${DB_SERVER_SOCKET}" || export ZBX_DB_SOCKET="${DB_SERVER_SOCKET}" export ZBX_DB_HOST="${DB_SERVER_HOST}"
test -z "${DB_SERVER_HOST}" || export ZBX_DB_HOST="${DB_SERVER_HOST}" export ZBX_DB_PORT="${DB_SERVER_PORT}"
test -z "${DB_SERVER_PORT}" || export ZBX_DB_PORT="${DB_SERVER_PORT}" if [ -n "${DB_SERVER_SOCKET}" ]; then
export ZBX_DB_SOCKET="${DB_SERVER_SOCKET}"
fi
export ZBX_DB_NAME="${DB_SERVER_DBNAME}" export ZBX_DB_NAME="${DB_SERVER_DBNAME}"
if [ -n "${ZBX_VAULT}" ] && [ -n "${ZBX_VAULTURL}" ] && [ ! -n "${ZBX_VAULTDBPATH}" ]; then if [ -n "${ZBX_VAULT}" ] && [ -n "${ZBX_VAULTURL}" ] && [ ! -n "${ZBX_VAULTDBPATH}" ]; then

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=ubuntu:noble ARG OS_BASE_IMAGE=ubuntu:noble
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -53,12 +53,9 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
tzdata \ tzdata \
traceroute \ traceroute \
nmap \ nmap \
iputils-ping \
krb5-user \
ca-certificates \ ca-certificates \
fping \ fping \
openssl \ openssl \
libcares2 \
libcurl4t64 \ libcurl4t64 \
libevent-2.1 \ libevent-2.1 \
libevent-pthreads-2.1 \ libevent-pthreads-2.1 \

View File

@ -160,12 +160,9 @@ file_process_from_env() {
# Check prerequisites for MySQL database # Check prerequisites for MySQL database
check_variables_mysql() { check_variables_mysql() {
if [ -n "${DB_SERVER_SOCKET}" ]; then if [ ! -n "${DB_SERVER_SOCKET}" ]; then
mysql_connect_args="-S ${DB_SERVER_SOCKET}"
else
: ${DB_SERVER_HOST:="mysql-server"} : ${DB_SERVER_HOST:="mysql-server"}
: ${DB_SERVER_PORT:="3306"} : ${DB_SERVER_PORT:="3306"}
mysql_connect_args="-h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT}"
fi fi
USE_DB_ROOT_USER=false USE_DB_ROOT_USER=false
@ -202,6 +199,11 @@ check_variables_mysql() {
DB_SERVER_DBNAME=${MYSQL_DATABASE:-"zabbix_proxy"} DB_SERVER_DBNAME=${MYSQL_DATABASE:-"zabbix_proxy"}
if [ ! -n "${DB_SERVER_SOCKET}" ]; then
mysql_connect_args="-h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT}"
else
mysql_connect_args="-S ${DB_SERVER_SOCKET}"
fi
} }
db_tls_params() { db_tls_params() {
@ -344,10 +346,11 @@ create_db_schema_mysql() {
} }
update_zbx_config() { update_zbx_config() {
test -z "${DB_SERVER_SOCKET}" || export ZBX_DB_SOCKET="${DB_SERVER_SOCKET}" export ZBX_DB_HOST="${DB_SERVER_HOST}"
test -z "${DB_SERVER_HOST}" || export ZBX_DB_HOST="${DB_SERVER_HOST}" export ZBX_DB_PORT="${DB_SERVER_PORT}"
test -z "${DB_SERVER_PORT}" || export ZBX_DB_PORT="${DB_SERVER_PORT}" if [ -n "${DB_SERVER_SOCKET}" ]; then
export ZBX_DB_SOCKET="${DB_SERVER_SOCKET}"
fi
export ZBX_DB_NAME="${DB_SERVER_DBNAME}" export ZBX_DB_NAME="${DB_SERVER_DBNAME}"
if [ -n "${ZBX_VAULT}" ] && [ -n "${ZBX_VAULTURL}" ] && [ ! -n "${ZBX_VAULTDBPATH}" ]; then if [ -n "${ZBX_VAULT}" ] && [ -n "${ZBX_VAULTURL}" ] && [ ! -n "${ZBX_VAULTDBPATH}" ]; then

View File

@ -14,17 +14,17 @@ Zabbix proxy is a process that may collect monitoring data from one or more moni
# Zabbix proxy images # Zabbix proxy images
These are the only official Zabbix proxy Docker images. They are based on Alpine Linux v3.23, Ubuntu 24.04 (noble), CentOS Stream 10 and Oracle Linux 10 images. The available versions of Zabbix proxy are: These are the only official Zabbix proxy Docker images. They are based on Alpine Linux v3.21, Ubuntu 24.04 (noble), CentOS Stream 9 and Oracle Linux 9 images. The available versions of Zabbix proxy are:
Zabbix proxy 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest)
Zabbix proxy 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*)
Zabbix proxy 6.0 (tags: alpine-6.0-latest, ubuntu-6.0-latest, ol-6.0-latest) Zabbix proxy 6.0 (tags: alpine-6.0-latest, ubuntu-6.0-latest, ol-6.0-latest)
Zabbix proxy 6.0.* (tags: alpine-6.0.*, ubuntu-6.0.*, ol-6.0.*) Zabbix proxy 6.0.* (tags: alpine-6.0.*, ubuntu-6.0.*, ol-6.0.*)
Zabbix proxy 7.0 (tags: alpine-7.0-latest, ubuntu-7.0-latest, ol-7.0-latest) Zabbix proxy 7.0 (tags: alpine-7.0-latest, ubuntu-7.0-latest, ol-7.0-latest)
Zabbix proxy 7.0.* (tags: alpine-7.0.*, ubuntu-7.0.*, ol-7.0.*) Zabbix proxy 7.0.* (tags: alpine-7.0.*, ubuntu-7.0.*, ol-7.0.*)
Zabbix proxy 7.2 (tags: alpine-7.2-latest, ubuntu-7.2-latest, ol-7.2-latest) Zabbix proxy 7.2 (tags: alpine-7.2-latest, ubuntu-7.2-latest, ol-7.2-latest, alpine-latest, ubuntu-latest, ol-latest, latest)
Zabbix proxy 7.2.* (tags: alpine-7.2.*, ubuntu-7.2.*, ol-7.2.*) Zabbix proxy 7.2.* (tags: alpine-7.2.*, ubuntu-7.2.*, ol-7.2.*)
Zabbix proxy 7.4 (tags: alpine-7.4-latest, ubuntu-7.4-latest, ol-7.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) Zabbix proxy 7.4 (tags: alpine-trunk, ubuntu-trunk, ol-trunk)
Zabbix proxy 7.4.* (tags: alpine-7.4.*, ubuntu-7.4.*, ol-7.4.*)
Zabbix proxy 8.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk)
Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux.
@ -172,7 +172,6 @@ ZBX_UNREACHABLEPERIOD=45
ZBX_UNAVAILABLEDELAY=60 ZBX_UNAVAILABLEDELAY=60
ZBX_UNREACHABLEDELAY=15 ZBX_UNREACHABLEDELAY=15
ZBX_LOGSLOWQUERIES=3000 ZBX_LOGSLOWQUERIES=3000
ZBX_TLSLISTEN= # Available since 7.4.0
ZBX_TLSCONNECT=unencrypted ZBX_TLSCONNECT=unencrypted
ZBX_TLSACCEPT=unencrypted ZBX_TLSACCEPT=unencrypted
ZBX_TLSCAFILE= ZBX_TLSCAFILE=
@ -197,6 +196,7 @@ ZBX_TLSCIPHERPSK13= # Available since 4.4.7
ZBX_WEBDRIVERURL= # Available since 7.0.0 ZBX_WEBDRIVERURL= # Available since 7.0.0
ZBX_STARTBROWSERPOLLERS=1 # Available since 7.0.0 ZBX_STARTBROWSERPOLLERS=1 # Available since 7.0.0
ZBX_STARTSNMPPOLLERS=1 # Available since 7.0.0 ZBX_STARTSNMPPOLLERS=1 # Available since 7.0.0
``` ```
Default values of these variables are specified after equal sign. Default values of these variables are specified after equal sign.
@ -280,7 +280,7 @@ Please see [the Docker installation documentation](https://docs.docker.com/insta
## Documentation ## Documentation
Documentation for this image is stored in the [`proxy-sqlite3/` directory](https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/proxy-sqlite3) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/7.4/README.md) before attempting a pull request. Documentation for this image is stored in the [`proxy-sqlite3/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/proxy-sqlite3) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/trunk/README.md) before attempting a pull request.
## Issues ## Issues

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=alpine:3.23 ARG OS_BASE_IMAGE=alpine:3.21
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-sqlite3:alpine-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-sqlite3:alpine-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -48,11 +48,9 @@ RUN set -eux && \
tzdata \ tzdata \
traceroute \ traceroute \
nmap \ nmap \
krb5 \
fping \ fping \
iputils \ iputils \
openssl \ openssl \
c-ares \
libcap \ libcap \
libcurl \ libcurl \
libevent \ libevent \

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=quay.io/centos/centos:stream10-minimal ARG OS_BASE_IMAGE=quay.io/centos/centos:stream9-minimal
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-sqlite3:centos-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-sqlite3:centos-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -50,11 +50,8 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
libevent \ libevent \
traceroute \ traceroute \
nmap \ nmap \
krb5-workstation \
c-ares \
libssh \ libssh \
fping \ fping \
iputils \
file-libs \ file-libs \
libxml2 \ libxml2 \
net-snmp-libs \ net-snmp-libs \

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=container-registry.oracle.com/os/oraclelinux:10-slim ARG OS_BASE_IMAGE=oraclelinux:9-slim
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-sqlite3:ol-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-sqlite3:ol-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -42,7 +42,7 @@ STOPSIGNAL SIGTERM
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/sbin/zabbix_proxy", "/usr/sbin/zabbix_proxy"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/sbin/zabbix_proxy", "/usr/sbin/zabbix_proxy"]
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "${ZABBIX_CONF_DIR}/"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "${ZABBIX_CONF_DIR}/"]
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/", "/usr/bin/"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/", "/usr/bin/"]
COPY ["conf/etc/yum.repos.d/oracle-epel-ol10.repo", "/etc/yum.repos.d/oracle-epel-ol10.repo"] COPY ["conf/etc/yum.repos.d/oracle-epel-ol9.repo", "/etc/yum.repos.d/oracle-epel-ol9.repo"]
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--mount=type=tmpfs,target=/var/cache/yum/ \ --mount=type=tmpfs,target=/var/cache/yum/ \
@ -51,11 +51,8 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
libevent \ libevent \
traceroute \ traceroute \
nmap \ nmap \
krb5-workstation \
c-ares \
libssh \ libssh \
fping \ fping \
iputils \
file-libs \ file-libs \
libxml2 \ libxml2 \
net-snmp-libs \ net-snmp-libs \
@ -68,9 +65,9 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
unixODBC" && \ unixODBC" && \
microdnf -y install \ microdnf -y install \
--disablerepo="*" \ --disablerepo="*" \
--enablerepo="ol10_baseos_latest" \ --enablerepo="ol9_baseos_latest" \
--enablerepo="ol10_appstream" \ --enablerepo="ol9_appstream" \
--enablerepo="ol10_u0_developer_EPEL" \ --enablerepo="ol9_developer_EPEL" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--setopt=keepcache=0 \ --setopt=keepcache=0 \
--best \ --best \

View File

@ -1,6 +0,0 @@
[ol10_u0_developer_EPEL]
name=Oracle Linux $releasever.0 EPEL Packages for Development ($basearch)
baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL10/0/developer/EPEL/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

View File

@ -0,0 +1,6 @@
[ol9_developer_EPEL]
name=Oracle Linux $releasever EPEL Packages for Development ($basearch)
baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL9/developer/EPEL/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

View File

@ -1,8 +1,8 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=registry.access.redhat.com/ubi10/ubi-minimal:10.1 ARG OS_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:9.5
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG RELEASE=6 ARG RELEASE=0
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-sqlite3:rhel-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-sqlite3:rhel-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -31,9 +31,9 @@ ENV ZBX_FPINGLOCATION="/usr/sbin/fping" \
LABEL description="Zabbix proxy with SQLite3 database support" \ LABEL description="Zabbix proxy with SQLite3 database support" \
maintainer="alexey.pustovalov@zabbix.com" \ maintainer="alexey.pustovalov@zabbix.com" \
name="zabbix/zabbix-proxy-sqlite-74" \ name="zabbix/zabbix-proxy-sqlite-trunk" \
release="${RELEASE}" \ release="${RELEASE}" \
run="docker run --name zabbix-proxy -p 10051:10051 -d registry.connect.redhat.com/zabbix/zabbix-proxy-sqlite-74:${ZBX_VERSION}" \ run="docker run --name zabbix-proxy -p 10051:10051 -d registry.connect.redhat.com/zabbix/zabbix-proxy-sqlite-trunk:${ZBX_VERSION}" \
summary="Zabbix proxy (SQLite3)" \ summary="Zabbix proxy (SQLite3)" \
url="https://www.zabbix.com/" \ url="https://www.zabbix.com/" \
vendor="Zabbix SIA" \ vendor="Zabbix SIA" \
@ -44,7 +44,7 @@ LABEL description="Zabbix proxy with SQLite3 database support" \
io.openshift.tags="zabbix,zabbix-proxy,sqlite" \ io.openshift.tags="zabbix,zabbix-proxy,sqlite" \
org.label-schema.build-date="${BUILD_DATE}" \ org.label-schema.build-date="${BUILD_DATE}" \
org.label-schema.description="Zabbix proxy with SQLite3 database support" \ org.label-schema.description="Zabbix proxy with SQLite3 database support" \
org.label-schema.docker.cmd="docker run --name zabbix-proxy -p 10051:10051 -d registry.connect.redhat.com/zabbix/zabbix-proxy-sqlite3-74:${ZBX_VERSION}" \ org.label-schema.docker.cmd="docker run --name zabbix-proxy -p 10051:10051 -d registry.connect.redhat.com/zabbix/zabbix-proxy-sqlite3-trunk:${ZBX_VERSION}" \
org.label-schema.license="AGPL v3.0" \ org.label-schema.license="AGPL v3.0" \
org.label-schema.name="zabbix-proxy-sqlite-rhel" \ org.label-schema.name="zabbix-proxy-sqlite-rhel" \
org.label-schema.schema-version="1.0" \ org.label-schema.schema-version="1.0" \
@ -69,8 +69,6 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
INSTALL_PKGS="bash \ INSTALL_PKGS="bash \
traceroute \ traceroute \
nmap \ nmap \
krb5-workstation \
c-ares \
shadow-utils \ shadow-utils \
fping \ fping \
iputils \ iputils \
@ -86,16 +84,16 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
sqlite-libs \ sqlite-libs \
unixODBC \ unixODBC \
zlib" && \ zlib" && \
curl --tlsv1.2 -sSf -L https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm -o /tmp/epel-release-latest-10.noarch.rpm && \ curl --tlsv1.2 -sSf -L https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm -o /tmp/epel-release-latest-9.noarch.rpm && \
rpm -ivh /tmp/epel-release-latest-10.noarch.rpm && \ rpm -ivh /tmp/epel-release-latest-9.noarch.rpm && \
rm -rf /tmp/epel-release-latest-10.noarch.rpm && \ rm -rf /tmp/epel-release-latest-9.noarch.rpm && \
ARCH_SUFFIX="$(arch)"; \ ARCH_SUFFIX="$(arch)"; \
microdnf -y install \ microdnf -y install \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "ubi-10-baseos-rpms" \ --enablerepo "ubi-9-baseos-rpms" \
--enablerepo "ubi-10-appstream-rpms" \ --enablerepo "ubi-9-appstream-rpms" \
--enablerepo "rhel-10-for-$ARCH_SUFFIX-baseos-rpms" \ --enablerepo "rhel-9-for-$ARCH_SUFFIX-baseos-rpms" \
--enablerepo "rhel-10-for-$ARCH_SUFFIX-appstream-rpms" \ --enablerepo "rhel-9-for-$ARCH_SUFFIX-appstream-rpms" \
--enablerepo "epel" \ --enablerepo "epel" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--setopt=keepcache=0 \ --setopt=keepcache=0 \
@ -105,20 +103,20 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
microdnf -y update \ microdnf -y update \
--disableplugin=subscription-manager \ --disableplugin=subscription-manager \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "ubi-10-baseos-rpms" \ --enablerepo "ubi-9-baseos-rpms" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--best \ --best \
--setopt=tsflags=nodocs \ --setopt=tsflags=nodocs \
tzdata && \ tzdata && \
# microdnf -y reinstall \ microdnf -y reinstall \
# --disableplugin=subscription-manager \ --disableplugin=subscription-manager \
# --disablerepo "*" \ --disablerepo "*" \
# --enablerepo "ubi-9-baseos-rpms" \ --enablerepo "ubi-9-baseos-rpms" \
# --setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
# --setopt=keepcache=0 \ --setopt=keepcache=0 \
# --best \ --best \
# --setopt=tsflags=nodocs \ --setopt=tsflags=nodocs \
# tzdata && \ tzdata && \
groupadd \ groupadd \
--system \ --system \
--gid 1995 \ --gid 1995 \

View File

@ -156,7 +156,7 @@ SNMP traps processing feature could be enabled using shared volume and switched
<p>The volume allows to add new MIB files. It does not support subdirectories, all MIBs must be placed to <code>/var/lib/zabbix/mibs</code>.</p> <p>The volume allows to add new MIB files. It does not support subdirectories, all MIBs must be placed to <code>/var/lib/zabbix/mibs</code>.</p>
<h1 id="user-feedback">User Feedback</h1> <h1 id="user-feedback">User Feedback</h1>
<h2 id="documentation">Documentation</h2> <h2 id="documentation">Documentation</h2>
<p>Documentation for this image is stored in the <a href="https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/proxy-sqlite3"><code>proxy-sqlite3/</code> directory</a> of the <a href="https://github.com/zabbix/zabbix-docker/"><code>zabbix/zabbix-docker</code> GitHub repo</a>. Be sure to familiarize yourself with the <a href="https://github.com/zabbix/zabbix-docker/blob/7.4/README.md">repository&#39;s <code>README.md</code> file</a> before attempting a pull request.</p> <p>Documentation for this image is stored in the <a href="https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/proxy-sqlite3"><code>proxy-sqlite3/</code> directory</a> of the <a href="https://github.com/zabbix/zabbix-docker/"><code>zabbix/zabbix-docker</code> GitHub repo</a>. Be sure to familiarize yourself with the <a href="https://github.com/zabbix/zabbix-docker/blob/trunk/README.md">repository&#39;s <code>README.md</code> file</a> before attempting a pull request.</p>
<h2 id="issues">Issues</h2> <h2 id="issues">Issues</h2>
<p>If you have any problems with or questions about this image, please contact us through a <a href="https://github.com/zabbix/zabbix-docker/issues">GitHub issue</a>.</p> <p>If you have any problems with or questions about this image, please contact us through a <a href="https://github.com/zabbix/zabbix-docker/issues">GitHub issue</a>.</p>
<h3 id="known-issues">Known issues</h3> <h3 id="known-issues">Known issues</h3>

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG OS_BASE_IMAGE=ubuntu:noble ARG OS_BASE_IMAGE=ubuntu:noble
ARG MAJOR_VERSION=7.4 ARG MAJOR_VERSION=7.4
ARG ZBX_VERSION=${MAJOR_VERSION}.6 ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-sqlite3:ubuntu-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-sqlite3:ubuntu-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} AS builder FROM ${BUILD_BASE_IMAGE} AS builder
@ -51,12 +51,9 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
tzdata \ tzdata \
traceroute \ traceroute \
nmap \ nmap \
iputils-ping \
krb5-user \
ca-certificates \ ca-certificates \
fping \ fping \
openssl \ openssl \
libcares2 \
libcurl4t64 \ libcurl4t64 \
libevent-2.1 \ libevent-2.1 \
libevent-pthreads-2.1 \ libevent-pthreads-2.1 \

Some files were not shown because too many files have changed in this diff Show More