diff --git a/.github/workflows/images_build_test.yml b/.github/workflows/images_build_test.yml index ca2ee86ec..90b3a5b9c 100644 --- a/.github/workflows/images_build_test.yml +++ b/.github/workflows/images_build_test.yml @@ -973,13 +973,6 @@ jobs: echo "$cache_from" >> "$GITHUB_OUTPUT" echo 'EOF' >> "$GITHUB_OUTPUT" - - name: Remove smartmontools - if: ${{ matrix.build == 'agent2' && matrix.os == 'rhel' }} - env: - DOCKERFILES_DIRECTORY: ${{ env.DOCKERFILES_DIRECTORY }} - run: | - sed -i '/smartmontools/d' "$DOCKERFILES_DIRECTORY/agent2/rhel/Dockerfile" - - name: Copy RedHat subscription if: ${{ matrix.os == 'rhel' }} env: diff --git a/Dockerfiles/agent2/rhel/Dockerfile b/Dockerfiles/agent2/rhel/Dockerfile index 7bf7b6e58..25519b909 100644 --- a/Dockerfiles/agent2/rhel/Dockerfile +++ b/Dockerfiles/agent2/rhel/Dockerfile @@ -56,6 +56,7 @@ COPY --from=builder ["/tmp/mongodb_plugin/zabbix-agent2-plugin-mongodb", "/usr/s COPY --from=builder ["/tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql", "/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-postgresql"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=bind,target=/run/secrets/,src=secrets/ \ set -eux && \ INSTALL_PKGS="bash \ iputils \ @@ -64,13 +65,12 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ smartmontools \ sudo \ libcurl-minimal" && \ - curl -sSL -o /tmp/epel-release-latest-9.noarch.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \ - rpm -ivh /tmp/epel-release-latest-9.noarch.rpm && \ - rm -rf /tmp/epel-release-latest-9.noarch.rpm && \ + ARCH_SUFFIX="$(arch)"; \ microdnf -y install \ --disableplugin=subscription-manager \ --disablerepo "*" \ --enablerepo "ubi-9-baseos-rpms" \ + --enablerepo "rhel-9-for-$ARCH_SUFFIX-baseos-beta-rpms" \ --enablerepo "epel" \ --setopt=install_weak_deps=0 \ --setopt=keepcache=0 \