Skip to content

Commit

Permalink
Merge pull request #1274 from zabbix/64_merge
Browse files Browse the repository at this point in the history
64 merge
  • Loading branch information
dotneft authored Mar 2, 2024
2 parents a4e950a + fa65964 commit eff9c35
Show file tree
Hide file tree
Showing 18 changed files with 101 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ZABBIX_ALPINE_IMAGE_TAG=alpine-6.4
ZABBIX_CENTOS_IMAGE_TAG=centos-6.4
ZABBIX_OL_IMAGE_TAG=ol-6.4
ZABBIX_UBUNTU_IMAGE_TAG=ubuntu-6.4
ZABBIX_RHEL_IMAGE_TAG=rhel-6.4
ZABBIX_IMAGE_TAG_POSTFIX=-latest
ZABBIX_LOCAL_IMAGE_TAG_POSTFIX=-local

Expand Down Expand Up @@ -65,6 +66,7 @@ ALPINE_CACHE_FROM=alpine:3.19
CENTOS_CACHE_FROM=quay.io/centos/centos:stream9
OL_CACHE_FROM=oraclelinux:9-slim
UBUNTU_CACHE_FROM=ubuntu:jammy
RHEL_CACHE_FROM=registry.access.redhat.com/ubi9/ubi-minimal:9.3

# Base images
BUILD_BASE_IMAGE=zabbix-build-base
Expand All @@ -84,3 +86,6 @@ OL_OS_TAG_SHORT=ol

UBUNTU_OS_TAG=Ubuntu
UBUNTU_OS_TAG_SHORT=ubuntu

RHEL_OS_TAG=Red Hat
RHEL_OS_TAG_SHORT=rhel
6 changes: 6 additions & 0 deletions .github/workflows/images_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,8 @@ jobs:
file: ${{ format('{0}/{1}/{2}/Dockerfile', env.DOCKERFILES_DIRECTORY, env.BASE_BUILD_NAME, matrix.os) }}
platforms: ${{ steps.platform.outputs.list }}
push: true
provenance: mode=max
sbom: true
tags: ${{ steps.meta.outputs.tags }}
labels: |
org.opencontainers.image.revision=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
Expand Down Expand Up @@ -628,6 +630,8 @@ jobs:
file: ${{ format('{0}/{1}/{2}/Dockerfile', env.DOCKERFILES_DIRECTORY, matrix.build, matrix.os) }}
platforms: ${{ steps.platform.outputs.list }}
push: true
provenance: mode=max
sbom: true
tags: ${{ steps.meta.outputs.tags }}
build-args: BUILD_BASE_IMAGE=${{ steps.base_build.outputs.base_build_image }}
labels: |
Expand Down Expand Up @@ -978,6 +982,8 @@ jobs:
file: ${{ format('{0}/{1}/{2}/Dockerfile', env.DOCKERFILES_DIRECTORY, matrix.build, matrix.os) }}
platforms: ${{ steps.platform.outputs.list }}
push: ${{ env.AUTO_PUSH_IMAGES == 'true' }}
provenance: mode=max
sbom: ${{ env.AUTO_PUSH_IMAGES == 'true' }}
tags: ${{ steps.meta.outputs.tags }}
build-args: BUILD_BASE_IMAGE=${{ steps.base_build.outputs.base_build_image }}
labels: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ zbx_env*/
.*CERT_FILE
.*KEY_FILE
.*CA_FILE
Dockerfiles/*/rhel/secrets/*
1 change: 0 additions & 1 deletion Dockerfiles/agent/ol/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
set -eux && \
INSTALL_PKGS="bash \
tini \
tzdata \
iputils \
pcre2 \
libcurl \
Expand Down
12 changes: 11 additions & 1 deletion Dockerfiles/agent/rhel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
set -eux && \
INSTALL_PKGS="bash \
tini \
tzdata \
iputils \
shadow-utils \
pcre2 \
Expand All @@ -64,6 +63,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
rpm -ivh /tmp/epel-release-latest-9.noarch.rpm && \
rm -rf /tmp/epel-release-latest-9.noarch.rpm && \
microdnf -y install \
--disableplugin=subscription-manager \
--disablerepo "*" \
--enablerepo "ubi-9-baseos-rpms" \
--enablerepo "epel" \
Expand All @@ -72,7 +72,17 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--best \
--setopt=tsflags=nodocs \
${INSTALL_PKGS} && \
microdnf -y update \
--disableplugin=subscription-manager \
--disablerepo "*" \
--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=keepcache=0 \
Expand Down
1 change: 0 additions & 1 deletion Dockerfiles/agent2/ol/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
set -eux && \
INSTALL_PKGS="bash \
tini \
tzdata \
iputils \
pcre2 \
libcurl \
Expand Down
12 changes: 11 additions & 1 deletion Dockerfiles/agent2/rhel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
set -eux && \
INSTALL_PKGS="bash \
tini \
tzdata \
iputils \
shadow-utils \
pcre2 \
Expand All @@ -70,6 +69,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
rpm -ivh /tmp/epel-release-latest-9.noarch.rpm && \
rm -rf /tmp/epel-release-latest-9.noarch.rpm && \
microdnf -y install \
--disableplugin=subscription-manager \
--disablerepo "*" \
--enablerepo "ubi-9-baseos-rpms" \
--enablerepo "epel" \
Expand All @@ -78,7 +78,17 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--best \
--setopt=tsflags=nodocs \
${INSTALL_PKGS} && \
microdnf -y update \
--disableplugin=subscription-manager \
--disablerepo "*" \
--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=keepcache=0 \
Expand Down
1 change: 1 addition & 0 deletions Dockerfiles/build-base/rhel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ LABEL description="Prepared environment to build Zabbix components" \
COPY ["licenses", "/licenses"]

RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--mount=type=bind,target=/run/secrets/,src=secrets/ \
set -eux && \
INSTALL_PKGS="autoconf \
automake \
Expand Down
1 change: 1 addition & 0 deletions Dockerfiles/java-gateway/rhel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
shadow-utils \
java-17-openjdk-headless" && \
microdnf -y install \
--disableplugin=subscription-manager \
--disablerepo "*" \
--enablerepo "ubi-9-baseos-rpms" \
--enablerepo "ubi-9-appstream-rpms" \
Expand Down
11 changes: 11 additions & 0 deletions Dockerfiles/proxy-mysql/rhel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_proxy.sql.gz", "/usr/share/doc/zabbix-proxy-mysql/create.sql.gz"]

RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--mount=type=bind,target=/run/secrets/,src=secrets/ \
set -eux && \
INSTALL_PKGS="bash \
tini \
Expand Down Expand Up @@ -91,7 +92,17 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--best \
--setopt=tsflags=nodocs \
${INSTALL_PKGS} && \
microdnf -y update \
--disableplugin=subscription-manager \
--disablerepo "*" \
--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 \
--best \
Expand Down
11 changes: 11 additions & 0 deletions Dockerfiles/proxy-sqlite3/rhel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/zabbix/zabbix_proxy.conf"]

RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--mount=type=bind,target=/run/secrets/,src=secrets/ \
set -eux && \
INSTALL_PKGS="bash \
tini \
Expand Down Expand Up @@ -87,7 +88,17 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--best \
--setopt=tsflags=nodocs \
${INSTALL_PKGS} && \
microdnf -y update \
--disableplugin=subscription-manager \
--disablerepo "*" \
--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=keepcache=0 \
Expand Down
1 change: 0 additions & 1 deletion Dockerfiles/server-mysql/ol/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
traceroute \
nmap \
file-libs \
tzdata \
iputils \
traceroute \
libevent \
Expand Down
12 changes: 11 additions & 1 deletion Dockerfiles/server-mysql/rhel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_server.conf", "/etc
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_server.sql.gz", "/usr/share/doc/zabbix-server-mysql/create.sql.gz"]

RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--mount=type=bind,target=/run/secrets/,src=secrets/ \
set -eux && \
INSTALL_PKGS="bash \
tini \
traceroute \
nmap \
fping \
shadow-utils \
tzdata \
iputils \
hostname \
libssh \
Expand Down Expand Up @@ -95,7 +95,17 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--best \
--setopt=tsflags=nodocs \
${INSTALL_PKGS} && \
microdnf -y update \
--disableplugin=subscription-manager \
--disablerepo "*" \
--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=keepcache=0 \
Expand Down
1 change: 0 additions & 1 deletion Dockerfiles/server-pgsql/ol/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
traceroute \
nmap \
iputils \
tzdata \
traceroute \
libevent \
libssh \
Expand Down
1 change: 0 additions & 1 deletion Dockerfiles/snmptraps/ol/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ STOPSIGNAL SIGTERM
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
set -eux && \
INSTALL_PKGS="bash \
tzdata \
net-snmp" && \
microdnf -y install \
--disablerepo="*" \
Expand Down
19 changes: 18 additions & 1 deletion Dockerfiles/snmptraps/rhel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
set -eux && \
INSTALL_PKGS="bash \
shadow-utils \
tzdata \
net-snmp" && \
microdnf -y install \
--disableplugin=subscription-manager \
--disablerepo="*" \
--enablerepo "ubi-9-baseos-rpms" \
--enablerepo "ubi-9-appstream-rpms" \
Expand All @@ -57,6 +57,23 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--best \
--setopt=tsflags=nodocs \
${INSTALL_PKGS} && \
microdnf -y update \
--disableplugin=subscription-manager \
--disablerepo "*" \
--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=keepcache=0 \
--best \
--setopt=tsflags=nodocs \
tzdata && \
groupadd \
--system \
--gid 1995 \
Expand Down
14 changes: 12 additions & 2 deletions Dockerfiles/web-nginx-mysql/rhel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ COPY ["conf/etc/", "/etc/"]
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]

RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--mount=type=bind,target=/run/secrets/,src=secrets/ \
set -eux && \
INSTALL_PKGS="bash \
tzdata \
curl-minimal \
supervisor \
shadow-utils \
Expand Down Expand Up @@ -83,12 +83,22 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--best \
--setopt=tsflags=nodocs \
${INSTALL_PKGS} && \
microdnf -y reinstall \
microdnf -y update \
--disableplugin=subscription-manager \
--disablerepo "*" \
--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=keepcache=0 \
--best \
--setopt=tsflags=nodocs \
tzdata && \
groupadd \
--system \
Expand Down
3 changes: 2 additions & 1 deletion Dockerfiles/web-service/rhel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_web_service",
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_web_service.conf", "/etc/zabbix/zabbix_web_service.conf"]

RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--mount=type=bind,target=/run/secrets/,src=secrets/ \
set -eux && \
INSTALL_PKGS="bash \
shadow-utils \
Expand All @@ -62,7 +63,6 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--disablerepo "*" \
--enablerepo "ubi-9-baseos-rpms" \
--enablerepo "ubi-9-appstream-rpms" \
--enablerepo "rhel-9-for-$ARCH_SUFFIX-baseos-rpms" \
--enablerepo "rhel-9-for-$ARCH_SUFFIX-appstream-rpms" \
--enablerepo "epel" \
--setopt=install_weak_deps=0 \
Expand All @@ -71,6 +71,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--setopt=tsflags=nodocs \
${INSTALL_PKGS} && \
microdnf -y install \
--disableplugin=subscription-manager \
--disablerepo "*" \
--enablerepo "ubi-9-baseos-rpms" \
--enablerepo "ubi-9-appstream-rpms" \
Expand Down

0 comments on commit eff9c35

Please sign in to comment.