From 15ad4769fc6bbd6a2ea25b058a27308751fe61bc Mon Sep 17 00:00:00 2001 From: Alexey Pustovalov Date: Thu, 30 May 2024 18:13:32 +0900 Subject: [PATCH] Sync repo with 6.4 --- Dockerfiles/agent/alpine/Dockerfile | 2 +- Dockerfiles/agent/centos/Dockerfile | 34 ++++++++------ Dockerfiles/agent/ol/Dockerfile | 2 +- Dockerfiles/agent/rhel/Dockerfile | 2 +- Dockerfiles/agent/ubuntu/Dockerfile | 2 +- Dockerfiles/agent/windows/Dockerfile | 2 +- Dockerfiles/agent2/alpine/Dockerfile | 2 +- Dockerfiles/agent2/centos/Dockerfile | 26 ++++++----- Dockerfiles/agent2/ol/Dockerfile | 2 +- Dockerfiles/agent2/rhel/Dockerfile | 2 +- Dockerfiles/agent2/ubuntu/Dockerfile | 2 +- Dockerfiles/agent2/windows/Dockerfile | 2 +- Dockerfiles/build-base/centos/Dockerfile | 4 +- Dockerfiles/build-base/rhel/Dockerfile | 1 + .../build-base/windows/Dockerfile.agent | 2 +- .../build-base/windows/Dockerfile.agent2 | 2 +- Dockerfiles/build-mysql/alpine/Dockerfile | 2 +- Dockerfiles/build-mysql/centos/Dockerfile | 2 +- Dockerfiles/build-mysql/ol/Dockerfile | 2 +- Dockerfiles/build-mysql/rhel/Dockerfile | 2 +- Dockerfiles/build-mysql/ubuntu/Dockerfile | 2 +- .../build-mysql/windows/Dockerfile.agent | 2 +- .../build-mysql/windows/Dockerfile.agent2 | 2 +- Dockerfiles/build-pgsql/alpine/Dockerfile | 2 +- Dockerfiles/build-pgsql/centos/Dockerfile | 2 +- Dockerfiles/build-pgsql/ol/Dockerfile | 2 +- Dockerfiles/build-pgsql/ubuntu/Dockerfile | 2 +- Dockerfiles/build-sqlite3/alpine/Dockerfile | 2 +- Dockerfiles/build-sqlite3/centos/Dockerfile | 2 +- Dockerfiles/build-sqlite3/ol/Dockerfile | 2 +- Dockerfiles/build-sqlite3/rhel/Dockerfile | 2 +- Dockerfiles/build-sqlite3/ubuntu/Dockerfile | 2 +- Dockerfiles/java-gateway/alpine/Dockerfile | 2 +- Dockerfiles/java-gateway/centos/Dockerfile | 6 +-- Dockerfiles/java-gateway/ol/Dockerfile | 2 +- Dockerfiles/java-gateway/rhel/Dockerfile | 3 +- Dockerfiles/java-gateway/ubuntu/Dockerfile | 2 +- Dockerfiles/proxy-mysql/alpine/Dockerfile | 2 +- Dockerfiles/proxy-mysql/centos/Dockerfile | 42 +++++++++++------- Dockerfiles/proxy-mysql/ol/Dockerfile | 2 +- Dockerfiles/proxy-mysql/rhel/Dockerfile | 3 +- Dockerfiles/proxy-mysql/ubuntu/Dockerfile | 2 +- Dockerfiles/proxy-sqlite3/alpine/Dockerfile | 2 +- Dockerfiles/proxy-sqlite3/centos/Dockerfile | 34 ++++++++------ Dockerfiles/proxy-sqlite3/ol/Dockerfile | 2 +- Dockerfiles/proxy-sqlite3/rhel/Dockerfile | 4 +- Dockerfiles/proxy-sqlite3/ubuntu/Dockerfile | 2 +- Dockerfiles/server-mysql/alpine/Dockerfile | 4 +- Dockerfiles/server-mysql/centos/Dockerfile | 44 ++++++++++++------- Dockerfiles/server-mysql/ol/Dockerfile | 10 ++++- Dockerfiles/server-mysql/rhel/Dockerfile | 5 ++- Dockerfiles/server-mysql/ubuntu/Dockerfile | 4 +- Dockerfiles/server-pgsql/alpine/Dockerfile | 2 +- Dockerfiles/server-pgsql/centos/Dockerfile | 14 +++--- Dockerfiles/server-pgsql/ol/Dockerfile | 2 +- Dockerfiles/server-pgsql/ubuntu/Dockerfile | 2 +- Dockerfiles/snmptraps/centos/Dockerfile | 24 +++++----- Dockerfiles/snmptraps/rhel/Dockerfile | 1 + .../web-apache-mysql/alpine/Dockerfile | 2 +- .../web-apache-mysql/centos/Dockerfile | 43 +++++++++++------- Dockerfiles/web-apache-mysql/ol/Dockerfile | 11 +++-- .../web-apache-mysql/ubuntu/Dockerfile | 2 +- .../web-apache-pgsql/alpine/Dockerfile | 2 +- .../web-apache-pgsql/centos/Dockerfile | 2 +- Dockerfiles/web-apache-pgsql/ol/Dockerfile | 2 +- .../web-apache-pgsql/ubuntu/Dockerfile | 2 +- Dockerfiles/web-nginx-mysql/alpine/Dockerfile | 2 +- Dockerfiles/web-nginx-mysql/centos/Dockerfile | 38 +++++++++++----- Dockerfiles/web-nginx-mysql/ol/Dockerfile | 11 +++-- Dockerfiles/web-nginx-mysql/rhel/Dockerfile | 2 +- .../rhel/conf/etc/yum.repo.d/nginx.repo | 2 +- Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile | 2 +- Dockerfiles/web-nginx-pgsql/alpine/Dockerfile | 2 +- Dockerfiles/web-nginx-pgsql/centos/Dockerfile | 16 +++---- Dockerfiles/web-nginx-pgsql/ol/Dockerfile | 2 +- Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile | 2 +- Dockerfiles/web-service/alpine/Dockerfile | 2 +- Dockerfiles/web-service/centos/Dockerfile | 29 ++++++++---- Dockerfiles/web-service/ol/Dockerfile | 2 +- Dockerfiles/web-service/rhel/Dockerfile | 4 +- Dockerfiles/web-service/ubuntu/Dockerfile | 2 +- 81 files changed, 318 insertions(+), 209 deletions(-) diff --git a/Dockerfiles/agent/alpine/Dockerfile b/Dockerfiles/agent/alpine/Dockerfile index 558e47b51..f70aee22b 100644 --- a/Dockerfiles/agent/alpine/Dockerfile +++ b/Dockerfiles/agent/alpine/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM alpine:3.19 diff --git a/Dockerfiles/agent/centos/Dockerfile b/Dockerfiles/agent/centos/Dockerfile index 82c2e74bb..a86faf6ac 100644 --- a/Dockerfiles/agent/centos/Dockerfile +++ b/Dockerfiles/agent/centos/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM quay.io/centos/centos:stream8 @@ -42,21 +42,27 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ libmodbus \ openssl-libs \ zlib" && \ - dnf -y install epel-release && \ dnf -y install \ - --disablerepo "*" \ - --enablerepo "${REPOLIST}" \ - --setopt=tsflags=nodocs \ - --setopt=install_weak_deps=False \ - --best \ - ${INSTALL_PKGS} && \ + --disablerepo "*" \ + --enablerepo "extras" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best epel-release && \ + dnf -y install \ + --disablerepo "*" \ + --enablerepo "${REPOLIST}" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best ${INSTALL_PKGS} && \ dnf -y reinstall \ - --disablerepo "*" \ - --enablerepo "baseos" \ - --setopt=tsflags=nodocs \ - --setopt=install_weak_deps=False \ - --best \ - tzdata && \ + --disablerepo "*" \ + --enablerepo "baseos" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best tzdata && \ groupadd \ --system \ --gid 1995 \ diff --git a/Dockerfiles/agent/ol/Dockerfile b/Dockerfiles/agent/ol/Dockerfile index 3c70a2999..22d29bd7a 100644 --- a/Dockerfiles/agent/ol/Dockerfile +++ b/Dockerfiles/agent/ol/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM oraclelinux:8-slim diff --git a/Dockerfiles/agent/rhel/Dockerfile b/Dockerfiles/agent/rhel/Dockerfile index 0fb66b910..bafee1a9f 100644 --- a/Dockerfiles/agent/rhel/Dockerfile +++ b/Dockerfiles/agent/rhel/Dockerfile @@ -4,7 +4,7 @@ ARG RELEASE=30 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10 diff --git a/Dockerfiles/agent/ubuntu/Dockerfile b/Dockerfiles/agent/ubuntu/Dockerfile index 96c51ee49..b2b7d1187 100644 --- a/Dockerfiles/agent/ubuntu/Dockerfile +++ b/Dockerfiles/agent/ubuntu/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM ubuntu:jammy diff --git a/Dockerfiles/agent/windows/Dockerfile b/Dockerfiles/agent/windows/Dockerfile index 1dc441640..1e917d26c 100644 --- a/Dockerfiles/agent/windows/Dockerfile +++ b/Dockerfiles/agent/windows/Dockerfile @@ -6,7 +6,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-agent:ltsc2022-agent-${ZBX_VERSION} ARG BASE_IMAGE=mcr.microsoft.com/powershell:lts-nanoserver-ltsc2022 -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM $BASE_IMAGE diff --git a/Dockerfiles/agent2/alpine/Dockerfile b/Dockerfiles/agent2/alpine/Dockerfile index 01a57f525..32447ced1 100644 --- a/Dockerfiles/agent2/alpine/Dockerfile +++ b/Dockerfiles/agent2/alpine/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM alpine:3.19 diff --git a/Dockerfiles/agent2/centos/Dockerfile b/Dockerfiles/agent2/centos/Dockerfile index 682f10555..9023f1012 100644 --- a/Dockerfiles/agent2/centos/Dockerfile +++ b/Dockerfiles/agent2/centos/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM quay.io/centos/centos:stream8 @@ -47,21 +47,27 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ smartmontools \ sudo \ openssl-libs" && \ - dnf -y install epel-release && \ + dnf -y install \ + --disablerepo "*" \ + --enablerepo "extras" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best epel-release && \ dnf -y install \ --disablerepo "*" \ --enablerepo "${REPOLIST}" \ --setopt=tsflags=nodocs \ --setopt=install_weak_deps=False \ - --best \ - ${INSTALL_PKGS} && \ + --setopt=keepcache=False \ + --best ${INSTALL_PKGS} && \ dnf -y reinstall \ - --disablerepo "*" \ - --enablerepo "baseos" \ - --setopt=tsflags=nodocs \ - --setopt=install_weak_deps=False \ - --best \ - tzdata && \ + --disablerepo "*" \ + --enablerepo "baseos" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best tzdata && \ groupadd \ --system \ --gid 1995 \ diff --git a/Dockerfiles/agent2/ol/Dockerfile b/Dockerfiles/agent2/ol/Dockerfile index 29fe62c19..42405b38f 100644 --- a/Dockerfiles/agent2/ol/Dockerfile +++ b/Dockerfiles/agent2/ol/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM oraclelinux:8-slim diff --git a/Dockerfiles/agent2/rhel/Dockerfile b/Dockerfiles/agent2/rhel/Dockerfile index fc702b8eb..0a1ea73e0 100644 --- a/Dockerfiles/agent2/rhel/Dockerfile +++ b/Dockerfiles/agent2/rhel/Dockerfile @@ -4,7 +4,7 @@ ARG RELEASE=30 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10 diff --git a/Dockerfiles/agent2/ubuntu/Dockerfile b/Dockerfiles/agent2/ubuntu/Dockerfile index 7381e551b..2f7852bb3 100644 --- a/Dockerfiles/agent2/ubuntu/Dockerfile +++ b/Dockerfiles/agent2/ubuntu/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM ubuntu:jammy diff --git a/Dockerfiles/agent2/windows/Dockerfile b/Dockerfiles/agent2/windows/Dockerfile index 7f863564b..030ef5792 100644 --- a/Dockerfiles/agent2/windows/Dockerfile +++ b/Dockerfiles/agent2/windows/Dockerfile @@ -6,7 +6,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-agent:ltsc2022-agent2-${ZBX_VERSION} ARG BASE_IMAGE=mcr.microsoft.com/powershell:lts-nanoserver-ltsc2022 -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM $BASE_IMAGE diff --git a/Dockerfiles/build-base/centos/Dockerfile b/Dockerfiles/build-base/centos/Dockerfile index 056dfcd07..a94e19bfb 100644 --- a/Dockerfiles/build-base/centos/Dockerfile +++ b/Dockerfiles/build-base/centos/Dockerfile @@ -65,6 +65,6 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ --enablerepo "${REPOLIST}" \ --setopt=tsflags=nodocs \ --setopt=install_weak_deps=False \ - --best \ - ${INSTALL_PKGS} && \ + --setopt=keepcache=False \ + --best ${INSTALL_PKGS} && \ dnf -y clean all diff --git a/Dockerfiles/build-base/rhel/Dockerfile b/Dockerfiles/build-base/rhel/Dockerfile index 0f60a47dd..93e04d3e9 100644 --- a/Dockerfiles/build-base/rhel/Dockerfile +++ b/Dockerfiles/build-base/rhel/Dockerfile @@ -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 \ diff --git a/Dockerfiles/build-base/windows/Dockerfile.agent b/Dockerfiles/build-base/windows/Dockerfile.agent index e03dcad4d..4f674eb78 100644 --- a/Dockerfiles/build-base/windows/Dockerfile.agent +++ b/Dockerfiles/build-base/windows/Dockerfile.agent @@ -1,7 +1,7 @@ # syntax=docker/dockerfile:1 # escape=` ARG BUILD_BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022 -FROM $BUILD_BASE_IMAGE as builder_base +FROM $BUILD_BASE_IMAGE AS builder_base ARG PCRE2_VERSION=10.43 ARG OPENSSL_VERSION=3.1.5 diff --git a/Dockerfiles/build-base/windows/Dockerfile.agent2 b/Dockerfiles/build-base/windows/Dockerfile.agent2 index b9a5bcad4..21a14acdd 100644 --- a/Dockerfiles/build-base/windows/Dockerfile.agent2 +++ b/Dockerfiles/build-base/windows/Dockerfile.agent2 @@ -1,7 +1,7 @@ # syntax=docker/dockerfile:1 # escape=` ARG BUILD_BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022 -FROM $BUILD_BASE_IMAGE as builder_base +FROM $BUILD_BASE_IMAGE AS builder_base ARG PCRE2_VERSION=10.43 ARG OPENSSL_VERSION=3.1.5 diff --git a/Dockerfiles/build-mysql/alpine/Dockerfile b/Dockerfiles/build-mysql/alpine/Dockerfile index 342ce2982..4020820d3 100644 --- a/Dockerfiles/build-mysql/alpine/Dockerfile +++ b/Dockerfiles/build-mysql/alpine/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-base:alpine-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder ARG MAJOR_VERSION ARG ZBX_VERSION diff --git a/Dockerfiles/build-mysql/centos/Dockerfile b/Dockerfiles/build-mysql/centos/Dockerfile index b2cc3cf44..c0f3736de 100644 --- a/Dockerfiles/build-mysql/centos/Dockerfile +++ b/Dockerfiles/build-mysql/centos/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-base:centos-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder ARG MAJOR_VERSION ARG ZBX_VERSION diff --git a/Dockerfiles/build-mysql/ol/Dockerfile b/Dockerfiles/build-mysql/ol/Dockerfile index ac286fdf6..dcdfd10f7 100644 --- a/Dockerfiles/build-mysql/ol/Dockerfile +++ b/Dockerfiles/build-mysql/ol/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-base:ol-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder ARG MAJOR_VERSION ARG ZBX_VERSION diff --git a/Dockerfiles/build-mysql/rhel/Dockerfile b/Dockerfiles/build-mysql/rhel/Dockerfile index 2564f0597..431b3309e 100644 --- a/Dockerfiles/build-mysql/rhel/Dockerfile +++ b/Dockerfiles/build-mysql/rhel/Dockerfile @@ -4,7 +4,7 @@ ARG RELEASE=30 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-base:rhel-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder ARG MAJOR_VERSION ARG RELEASE diff --git a/Dockerfiles/build-mysql/ubuntu/Dockerfile b/Dockerfiles/build-mysql/ubuntu/Dockerfile index 9ed7316f8..18acd1bd3 100644 --- a/Dockerfiles/build-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/build-mysql/ubuntu/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-base:ubuntu-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder ARG MAJOR_VERSION ARG ZBX_VERSION diff --git a/Dockerfiles/build-mysql/windows/Dockerfile.agent b/Dockerfiles/build-mysql/windows/Dockerfile.agent index a80c0dd8d..c2bc38051 100644 --- a/Dockerfiles/build-mysql/windows/Dockerfile.agent +++ b/Dockerfiles/build-mysql/windows/Dockerfile.agent @@ -4,7 +4,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-base:ltsc2022-agent-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] diff --git a/Dockerfiles/build-mysql/windows/Dockerfile.agent2 b/Dockerfiles/build-mysql/windows/Dockerfile.agent2 index d5208bf60..dba592efb 100644 --- a/Dockerfiles/build-mysql/windows/Dockerfile.agent2 +++ b/Dockerfiles/build-mysql/windows/Dockerfile.agent2 @@ -4,7 +4,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-base:ltsc2022-agent2-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] diff --git a/Dockerfiles/build-pgsql/alpine/Dockerfile b/Dockerfiles/build-pgsql/alpine/Dockerfile index b9a6799a0..8dbb4e77f 100644 --- a/Dockerfiles/build-pgsql/alpine/Dockerfile +++ b/Dockerfiles/build-pgsql/alpine/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-base:alpine-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder ARG MAJOR_VERSION ARG ZBX_VERSION diff --git a/Dockerfiles/build-pgsql/centos/Dockerfile b/Dockerfiles/build-pgsql/centos/Dockerfile index 8be26f90e..a30bc613c 100644 --- a/Dockerfiles/build-pgsql/centos/Dockerfile +++ b/Dockerfiles/build-pgsql/centos/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-base:centos-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder ARG MAJOR_VERSION ARG ZBX_VERSION diff --git a/Dockerfiles/build-pgsql/ol/Dockerfile b/Dockerfiles/build-pgsql/ol/Dockerfile index e91c043a7..89457cf1d 100644 --- a/Dockerfiles/build-pgsql/ol/Dockerfile +++ b/Dockerfiles/build-pgsql/ol/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-base:ol-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder ARG MAJOR_VERSION ARG ZBX_VERSION diff --git a/Dockerfiles/build-pgsql/ubuntu/Dockerfile b/Dockerfiles/build-pgsql/ubuntu/Dockerfile index d810637bc..4b2b4aaf2 100644 --- a/Dockerfiles/build-pgsql/ubuntu/Dockerfile +++ b/Dockerfiles/build-pgsql/ubuntu/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-base:ubuntu-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder ARG MAJOR_VERSION ARG ZBX_VERSION diff --git a/Dockerfiles/build-sqlite3/alpine/Dockerfile b/Dockerfiles/build-sqlite3/alpine/Dockerfile index b8e6c942c..f165455b1 100644 --- a/Dockerfiles/build-sqlite3/alpine/Dockerfile +++ b/Dockerfiles/build-sqlite3/alpine/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-base:alpine-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder ARG MAJOR_VERSION ARG ZBX_VERSION diff --git a/Dockerfiles/build-sqlite3/centos/Dockerfile b/Dockerfiles/build-sqlite3/centos/Dockerfile index d28fb090f..e63956f48 100644 --- a/Dockerfiles/build-sqlite3/centos/Dockerfile +++ b/Dockerfiles/build-sqlite3/centos/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-base:centos-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder ARG MAJOR_VERSION ARG ZBX_VERSION diff --git a/Dockerfiles/build-sqlite3/ol/Dockerfile b/Dockerfiles/build-sqlite3/ol/Dockerfile index 1ac6e904e..491f36aa4 100644 --- a/Dockerfiles/build-sqlite3/ol/Dockerfile +++ b/Dockerfiles/build-sqlite3/ol/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-base:ol-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder ARG MAJOR_VERSION ARG ZBX_VERSION diff --git a/Dockerfiles/build-sqlite3/rhel/Dockerfile b/Dockerfiles/build-sqlite3/rhel/Dockerfile index 998b37069..7b9ba1ee5 100644 --- a/Dockerfiles/build-sqlite3/rhel/Dockerfile +++ b/Dockerfiles/build-sqlite3/rhel/Dockerfile @@ -4,7 +4,7 @@ ARG RELEASE=30 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-base:rhel-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder ARG MAJOR_VERSION ARG RELEASE diff --git a/Dockerfiles/build-sqlite3/ubuntu/Dockerfile b/Dockerfiles/build-sqlite3/ubuntu/Dockerfile index 886477120..2b5ff0b8b 100644 --- a/Dockerfiles/build-sqlite3/ubuntu/Dockerfile +++ b/Dockerfiles/build-sqlite3/ubuntu/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-base:ubuntu-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder ARG MAJOR_VERSION ARG ZBX_VERSION diff --git a/Dockerfiles/java-gateway/alpine/Dockerfile b/Dockerfiles/java-gateway/alpine/Dockerfile index 0e5d3e3b7..d324e79b6 100644 --- a/Dockerfiles/java-gateway/alpine/Dockerfile +++ b/Dockerfiles/java-gateway/alpine/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM alpine:3.19 diff --git a/Dockerfiles/java-gateway/centos/Dockerfile b/Dockerfiles/java-gateway/centos/Dockerfile index a3c4c75b9..660b9d373 100644 --- a/Dockerfiles/java-gateway/centos/Dockerfile +++ b/Dockerfiles/java-gateway/centos/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM quay.io/centos/centos:stream8 @@ -40,8 +40,8 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ --enablerepo "${REPOLIST}" \ --setopt=tsflags=nodocs \ --setopt=install_weak_deps=False \ - --best \ - ${INSTALL_PKGS} && \ + --setopt=keepcache=False \ + --best ${INSTALL_PKGS} && \ groupadd \ --system \ --gid 1995 \ diff --git a/Dockerfiles/java-gateway/ol/Dockerfile b/Dockerfiles/java-gateway/ol/Dockerfile index 4b7751bea..ea6bfa300 100644 --- a/Dockerfiles/java-gateway/ol/Dockerfile +++ b/Dockerfiles/java-gateway/ol/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM oraclelinux:8-slim diff --git a/Dockerfiles/java-gateway/rhel/Dockerfile b/Dockerfiles/java-gateway/rhel/Dockerfile index 4bf77903a..09ddd7be8 100644 --- a/Dockerfiles/java-gateway/rhel/Dockerfile +++ b/Dockerfiles/java-gateway/rhel/Dockerfile @@ -4,7 +4,7 @@ ARG RELEASE=30 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10 @@ -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-8-baseos-rpms" \ --enablerepo "ubi-8-appstream-rpms" \ diff --git a/Dockerfiles/java-gateway/ubuntu/Dockerfile b/Dockerfiles/java-gateway/ubuntu/Dockerfile index f37320035..dc9afa01d 100644 --- a/Dockerfiles/java-gateway/ubuntu/Dockerfile +++ b/Dockerfiles/java-gateway/ubuntu/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM ubuntu:jammy diff --git a/Dockerfiles/proxy-mysql/alpine/Dockerfile b/Dockerfiles/proxy-mysql/alpine/Dockerfile index 430d5629d..d77e1bb6c 100644 --- a/Dockerfiles/proxy-mysql/alpine/Dockerfile +++ b/Dockerfiles/proxy-mysql/alpine/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM alpine:3.19 diff --git a/Dockerfiles/proxy-mysql/centos/Dockerfile b/Dockerfiles/proxy-mysql/centos/Dockerfile index a77da8d15..7199da1c7 100644 --- a/Dockerfiles/proxy-mysql/centos/Dockerfile +++ b/Dockerfiles/proxy-mysql/centos/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM quay.io/centos/centos:stream8 @@ -55,22 +55,34 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ pcre2 \ zlib \ unixODBC" && \ - dnf -y module enable mysql && \ - dnf -y install epel-release && \ dnf -y install \ - --disablerepo "*" \ - --enablerepo "${REPOLIST}" \ - --setopt=tsflags=nodocs \ - --setopt=install_weak_deps=False \ - --best \ - ${INSTALL_PKGS} && \ + --disablerepo "*" \ + --enablerepo "extras" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best epel-release && \ + dnf -y module enable \ + --disablerepo "*" \ + --enablerepo "appstream" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + mysql && \ + dnf -y install \ + --disablerepo "*" \ + --enablerepo "${REPOLIST}" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best ${INSTALL_PKGS} && \ dnf -y reinstall \ - --disablerepo "*" \ - --enablerepo "baseos" \ - --setopt=tsflags=nodocs \ - --setopt=install_weak_deps=False \ - --best \ - tzdata && \ + --disablerepo "*" \ + --enablerepo "baseos" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best tzdata && \ groupadd \ --system \ --gid 1995 \ diff --git a/Dockerfiles/proxy-mysql/ol/Dockerfile b/Dockerfiles/proxy-mysql/ol/Dockerfile index 13a4bc7e9..c133cd076 100644 --- a/Dockerfiles/proxy-mysql/ol/Dockerfile +++ b/Dockerfiles/proxy-mysql/ol/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM oraclelinux:8-slim diff --git a/Dockerfiles/proxy-mysql/rhel/Dockerfile b/Dockerfiles/proxy-mysql/rhel/Dockerfile index 69fbab421..e23ec59f2 100644 --- a/Dockerfiles/proxy-mysql/rhel/Dockerfile +++ b/Dockerfiles/proxy-mysql/rhel/Dockerfile @@ -4,7 +4,7 @@ ARG RELEASE=30 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10 @@ -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 \ diff --git a/Dockerfiles/proxy-mysql/ubuntu/Dockerfile b/Dockerfiles/proxy-mysql/ubuntu/Dockerfile index 65ab3cb8b..0adea853e 100644 --- a/Dockerfiles/proxy-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/proxy-mysql/ubuntu/Dockerfile @@ -4,7 +4,7 @@ ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION} ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM ubuntu:jammy diff --git a/Dockerfiles/proxy-sqlite3/alpine/Dockerfile b/Dockerfiles/proxy-sqlite3/alpine/Dockerfile index 6bb19e58a..a6dcfa3b1 100644 --- a/Dockerfiles/proxy-sqlite3/alpine/Dockerfile +++ b/Dockerfiles/proxy-sqlite3/alpine/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-sqlite3:alpine-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM alpine:3.19 diff --git a/Dockerfiles/proxy-sqlite3/centos/Dockerfile b/Dockerfiles/proxy-sqlite3/centos/Dockerfile index 1a0cc0ed6..9e6e173bd 100644 --- a/Dockerfiles/proxy-sqlite3/centos/Dockerfile +++ b/Dockerfiles/proxy-sqlite3/centos/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-sqlite3:centos-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM quay.io/centos/centos:stream8 @@ -52,21 +52,27 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ pcre2 \ zlib \ unixODBC" && \ - dnf -y install epel-release && \ dnf -y install \ - --disablerepo "*" \ - --enablerepo "${REPOLIST}" \ - --setopt=tsflags=nodocs \ - --setopt=install_weak_deps=False \ - --best \ - ${INSTALL_PKGS} && \ + --disablerepo "*" \ + --enablerepo "extras" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best epel-release && \ + dnf -y install \ + --disablerepo "*" \ + --enablerepo "${REPOLIST}" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best ${INSTALL_PKGS} && \ dnf -y reinstall \ - --disablerepo "*" \ - --enablerepo "baseos" \ - --setopt=tsflags=nodocs \ - --setopt=install_weak_deps=False \ - --best \ - tzdata && \ + --disablerepo "*" \ + --enablerepo "baseos" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best tzdata && \ groupadd \ --system \ --gid 1995 \ diff --git a/Dockerfiles/proxy-sqlite3/ol/Dockerfile b/Dockerfiles/proxy-sqlite3/ol/Dockerfile index 0eb81081e..93226fedf 100644 --- a/Dockerfiles/proxy-sqlite3/ol/Dockerfile +++ b/Dockerfiles/proxy-sqlite3/ol/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-sqlite3:ol-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM oraclelinux:8-slim diff --git a/Dockerfiles/proxy-sqlite3/rhel/Dockerfile b/Dockerfiles/proxy-sqlite3/rhel/Dockerfile index 482ddd3bd..b214e8b67 100644 --- a/Dockerfiles/proxy-sqlite3/rhel/Dockerfile +++ b/Dockerfiles/proxy-sqlite3/rhel/Dockerfile @@ -4,7 +4,7 @@ ARG RELEASE=30 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-sqlite3:rhel-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10 @@ -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 \ @@ -87,6 +88,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ --setopt=tsflags=nodocs \ ${INSTALL_PKGS} && \ microdnf -y reinstall \ + --disableplugin=subscription-manager \ --enablerepo "ubi-8-baseos-rpms" \ --setopt=install_weak_deps=0 \ --setopt=keepcache=0 \ diff --git a/Dockerfiles/proxy-sqlite3/ubuntu/Dockerfile b/Dockerfiles/proxy-sqlite3/ubuntu/Dockerfile index 70cb4f98f..ba6b55cfe 100644 --- a/Dockerfiles/proxy-sqlite3/ubuntu/Dockerfile +++ b/Dockerfiles/proxy-sqlite3/ubuntu/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-sqlite3:ubuntu-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM ubuntu:jammy diff --git a/Dockerfiles/server-mysql/alpine/Dockerfile b/Dockerfiles/server-mysql/alpine/Dockerfile index 5d0582f1c..f5944eb38 100644 --- a/Dockerfiles/server-mysql/alpine/Dockerfile +++ b/Dockerfiles/server-mysql/alpine/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM alpine:3.19 @@ -79,7 +79,7 @@ RUN set -eux && \ mkdir -p /etc/zabbix && \ mkdir -p /var/lib/zabbix && \ mkdir -p /usr/lib/zabbix/alertscripts && \ - mkdir -p /usr/lib/zabbix/dbscripts && \ + mkdir -p /var/lib/zabbix/dbscripts && \ mkdir -p /var/lib/zabbix/enc && \ mkdir -p /var/lib/zabbix/export && \ mkdir -p /usr/lib/zabbix/externalscripts && \ diff --git a/Dockerfiles/server-mysql/centos/Dockerfile b/Dockerfiles/server-mysql/centos/Dockerfile index 57b1ab70f..621a60316 100644 --- a/Dockerfiles/server-mysql/centos/Dockerfile +++ b/Dockerfiles/server-mysql/centos/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM quay.io/centos/centos:stream8 @@ -57,22 +57,34 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ zlib \ gzip \ unixODBC" && \ - dnf -y module enable mysql && \ - dnf -y install epel-release && \ dnf -y install \ - --disablerepo "*" \ - --enablerepo "${REPOLIST}" \ - --setopt=tsflags=nodocs \ - --setopt=install_weak_deps=False \ - --best \ - ${INSTALL_PKGS} && \ + --disablerepo "*" \ + --enablerepo "extras" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best epel-release && \ + dnf -y module enable \ + --disablerepo "*" \ + --enablerepo "appstream" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + mysql && \ + dnf -y install \ + --disablerepo "*" \ + --enablerepo "${REPOLIST}" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best ${INSTALL_PKGS} && \ dnf -y reinstall \ - --disablerepo "*" \ - --enablerepo "baseos" \ - --setopt=tsflags=nodocs \ - --setopt=install_weak_deps=False \ - --best \ - tzdata && \ + --disablerepo "*" \ + --enablerepo "baseos" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best tzdata && \ groupadd \ --system \ --gid 1995 \ @@ -91,7 +103,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ mkdir -p /etc/zabbix && \ mkdir -p /var/lib/zabbix && \ mkdir -p /usr/lib/zabbix/alertscripts && \ - mkdir -p /usr/lib/zabbix/dbscripts && \ + mkdir -p /var/lib/zabbix/dbscripts && \ mkdir -p /var/lib/zabbix/enc && \ mkdir -p /var/lib/zabbix/export && \ mkdir -p /usr/lib/zabbix/externalscripts && \ diff --git a/Dockerfiles/server-mysql/ol/Dockerfile b/Dockerfiles/server-mysql/ol/Dockerfile index 31edac1c8..0dd67f697 100644 --- a/Dockerfiles/server-mysql/ol/Dockerfile +++ b/Dockerfiles/server-mysql/ol/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM oraclelinux:8-slim @@ -58,7 +58,13 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ pcre2 \ zlib \ unixODBC" && \ - microdnf -y module enable mysql && \ + microdnf -y module enable \ + --disablerepo "*" \ + --enablerepo "ol8_appstream" \ + --setopt=install_weak_deps=0 \ + --setopt=keepcache=0 \ + --best \ + --nodocs mysql && \ microdnf -y install \ --disablerepo="*" \ --enablerepo="ol8_baseos_latest" \ diff --git a/Dockerfiles/server-mysql/rhel/Dockerfile b/Dockerfiles/server-mysql/rhel/Dockerfile index 065b44294..952c3e17a 100644 --- a/Dockerfiles/server-mysql/rhel/Dockerfile +++ b/Dockerfiles/server-mysql/rhel/Dockerfile @@ -4,7 +4,7 @@ ARG RELEASE=30 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10 @@ -54,6 +54,7 @@ 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 \ @@ -127,7 +128,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ mkdir -p /etc/zabbix && \ mkdir -p /var/lib/zabbix && \ mkdir -p /usr/lib/zabbix/alertscripts && \ - mkdir -p /usr/lib/zabbix/dbscripts && \ + mkdir -p /var/lib/zabbix/dbscripts && \ mkdir -p /var/lib/zabbix/enc && \ mkdir -p /var/lib/zabbix/export && \ mkdir -p /usr/lib/zabbix/externalscripts && \ diff --git a/Dockerfiles/server-mysql/ubuntu/Dockerfile b/Dockerfiles/server-mysql/ubuntu/Dockerfile index 6f291fd01..e59c92b4c 100644 --- a/Dockerfiles/server-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/server-mysql/ubuntu/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM ubuntu:jammy @@ -82,7 +82,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ mkdir -p /etc/zabbix && \ mkdir -p /var/lib/zabbix && \ mkdir -p /usr/lib/zabbix/alertscripts && \ - mkdir -p /usr/lib/zabbix/dbscripts && \ + mkdir -p /var/lib/zabbix/dbscripts && \ mkdir -p /var/lib/zabbix/enc && \ mkdir -p /var/lib/zabbix/export && \ mkdir -p /usr/lib/zabbix/externalscripts && \ diff --git a/Dockerfiles/server-pgsql/alpine/Dockerfile b/Dockerfiles/server-pgsql/alpine/Dockerfile index 1334e341a..bcaccf4eb 100644 --- a/Dockerfiles/server-pgsql/alpine/Dockerfile +++ b/Dockerfiles/server-pgsql/alpine/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:alpine-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM alpine:3.19 diff --git a/Dockerfiles/server-pgsql/centos/Dockerfile b/Dockerfiles/server-pgsql/centos/Dockerfile index 3547d3208..fd51fd15f 100644 --- a/Dockerfiles/server-pgsql/centos/Dockerfile +++ b/Dockerfiles/server-pgsql/centos/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:centos-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM quay.io/centos/centos:stream8 @@ -80,12 +80,12 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ --setopt=keepcache=False \ --best ${INSTALL_PKGS} && \ dnf -y reinstall \ - --disablerepo "*" \ - --enablerepo "baseos" \ - --setopt=tsflags=nodocs \ - --setopt=install_weak_deps=False \ - --best \ - tzdata && \ + --disablerepo "*" \ + --enablerepo "baseos" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best tzdata && \ groupadd \ --system \ --gid 1995 \ diff --git a/Dockerfiles/server-pgsql/ol/Dockerfile b/Dockerfiles/server-pgsql/ol/Dockerfile index 49894f934..a40be3c13 100644 --- a/Dockerfiles/server-pgsql/ol/Dockerfile +++ b/Dockerfiles/server-pgsql/ol/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:ol-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM oraclelinux:8-slim diff --git a/Dockerfiles/server-pgsql/ubuntu/Dockerfile b/Dockerfiles/server-pgsql/ubuntu/Dockerfile index bb133d2de..d35b8afce 100644 --- a/Dockerfiles/server-pgsql/ubuntu/Dockerfile +++ b/Dockerfiles/server-pgsql/ubuntu/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:ubuntu-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM ubuntu:jammy diff --git a/Dockerfiles/snmptraps/centos/Dockerfile b/Dockerfiles/snmptraps/centos/Dockerfile index e87466202..4ed4c50f6 100644 --- a/Dockerfiles/snmptraps/centos/Dockerfile +++ b/Dockerfiles/snmptraps/centos/Dockerfile @@ -27,19 +27,19 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ INSTALL_PKGS="bash \ net-snmp" && \ dnf -y install \ - --disablerepo "*" \ - --enablerepo "${REPOLIST}" \ - --setopt=tsflags=nodocs \ - --setopt=install_weak_deps=False \ - --best \ - ${INSTALL_PKGS} && \ + --disablerepo "*" \ + --enablerepo "${REPOLIST}" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best ${INSTALL_PKGS} && \ dnf -y reinstall \ - --disablerepo "*" \ - --enablerepo "baseos" \ - --setopt=tsflags=nodocs \ - --setopt=install_weak_deps=False \ - --best \ - tzdata && \ + --disablerepo "*" \ + --enablerepo "baseos" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best tzdata && \ groupadd \ --system \ --gid 1995 \ diff --git a/Dockerfiles/snmptraps/rhel/Dockerfile b/Dockerfiles/snmptraps/rhel/Dockerfile index 3b0a73219..a275165d1 100644 --- a/Dockerfiles/snmptraps/rhel/Dockerfile +++ b/Dockerfiles/snmptraps/rhel/Dockerfile @@ -48,6 +48,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ shadow-utils \ net-snmp" && \ microdnf -y install \ + --disableplugin=subscription-manager \ --disablerepo="*" \ --enablerepo "ubi-8-baseos-rpms" \ --enablerepo "ubi-8-appstream-rpms" \ diff --git a/Dockerfiles/web-apache-mysql/alpine/Dockerfile b/Dockerfiles/web-apache-mysql/alpine/Dockerfile index d483cf44c..e34d43da8 100644 --- a/Dockerfiles/web-apache-mysql/alpine/Dockerfile +++ b/Dockerfiles/web-apache-mysql/alpine/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM alpine:3.19 diff --git a/Dockerfiles/web-apache-mysql/centos/Dockerfile b/Dockerfiles/web-apache-mysql/centos/Dockerfile index ead115443..bd48198ed 100644 --- a/Dockerfiles/web-apache-mysql/centos/Dockerfile +++ b/Dockerfiles/web-apache-mysql/centos/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM quay.io/centos/centos:stream8 @@ -49,23 +49,34 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ findutils \ glibc-locale-source \ supervisor" && \ - dnf -y install epel-release && \ - dnf -y module enable mysql && \ - dnf -y module enable php:8.2 && \ dnf -y install \ - --disablerepo "*" \ - --enablerepo "${REPOLIST}" \ - --setopt=tsflags=nodocs \ - --setopt=install_weak_deps=False \ - --best \ - ${INSTALL_PKGS} && \ + --disablerepo "*" \ + --enablerepo "extras" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best epel-release && \ + dnf -y module enable \ + --disablerepo "*" \ + --enablerepo "appstream" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + mysql php:8.2 && \ + dnf -y install \ + --disablerepo "*" \ + --enablerepo "${REPOLIST}" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best ${INSTALL_PKGS} && \ dnf -y reinstall \ - --disablerepo "*" \ - --enablerepo "baseos" \ - --setopt=tsflags=nodocs \ - --setopt=install_weak_deps=False \ - --best \ - tzdata && \ + --disablerepo "*" \ + --enablerepo "baseos" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best tzdata && \ groupadd \ --system \ --gid 1995 \ diff --git a/Dockerfiles/web-apache-mysql/ol/Dockerfile b/Dockerfiles/web-apache-mysql/ol/Dockerfile index b37f48125..29f5e576e 100644 --- a/Dockerfiles/web-apache-mysql/ol/Dockerfile +++ b/Dockerfiles/web-apache-mysql/ol/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM oraclelinux:8-slim @@ -49,8 +49,13 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ findutils \ glibc-locale-source \ supervisor" && \ - microdnf -y module enable mysql && \ - microdnf -y module enable php:8.0 && \ + microdnf -y module enable \ + --disablerepo "*" \ + --enablerepo "ol8_appstream" \ + --setopt=install_weak_deps=0 \ + --setopt=keepcache=0 \ + --best \ + --nodocs mysql php:8.2 && \ microdnf -y install \ --disablerepo="*" \ --enablerepo="ol8_baseos_latest" \ diff --git a/Dockerfiles/web-apache-mysql/ubuntu/Dockerfile b/Dockerfiles/web-apache-mysql/ubuntu/Dockerfile index 68cb05a2d..0f274683f 100644 --- a/Dockerfiles/web-apache-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/web-apache-mysql/ubuntu/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM ubuntu:jammy diff --git a/Dockerfiles/web-apache-pgsql/alpine/Dockerfile b/Dockerfiles/web-apache-pgsql/alpine/Dockerfile index 434d44c0a..3ddadae9e 100644 --- a/Dockerfiles/web-apache-pgsql/alpine/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/alpine/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:alpine-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM alpine:3.19 diff --git a/Dockerfiles/web-apache-pgsql/centos/Dockerfile b/Dockerfiles/web-apache-pgsql/centos/Dockerfile index bff94e5eb..bde3315f6 100644 --- a/Dockerfiles/web-apache-pgsql/centos/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/centos/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM quay.io/centos/centos:stream8 diff --git a/Dockerfiles/web-apache-pgsql/ol/Dockerfile b/Dockerfiles/web-apache-pgsql/ol/Dockerfile index c4758d40c..7d0a9569d 100644 --- a/Dockerfiles/web-apache-pgsql/ol/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/ol/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM oraclelinux:8-slim diff --git a/Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile b/Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile index c4e9790ff..2fdaf79d1 100644 --- a/Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM ubuntu:jammy diff --git a/Dockerfiles/web-nginx-mysql/alpine/Dockerfile b/Dockerfiles/web-nginx-mysql/alpine/Dockerfile index 550473f66..2495b9a3b 100644 --- a/Dockerfiles/web-nginx-mysql/alpine/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/alpine/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM alpine:3.19 diff --git a/Dockerfiles/web-nginx-mysql/centos/Dockerfile b/Dockerfiles/web-nginx-mysql/centos/Dockerfile index d1fb3403f..8b25423f9 100644 --- a/Dockerfiles/web-nginx-mysql/centos/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/centos/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM quay.io/centos/centos:stream8 @@ -47,16 +47,34 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ findutils \ glibc-locale-source \ supervisor" && \ - dnf -y install epel-release && \ - dnf -y module enable mysql && \ - dnf -y module enable php:8.2 nginx:1.24 && \ dnf -y install \ - --disablerepo "*" \ - --enablerepo "${REPOLIST}" \ - --setopt=tsflags=nodocs \ - --setopt=install_weak_deps=False \ - --best \ - ${INSTALL_PKGS} && \ + --disablerepo "*" \ + --enablerepo "extras" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best epel-release && \ + dnf -y module enable \ + --disablerepo "*" \ + --enablerepo "appstream" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + mysql php:8.2 nginx:1.24 && \ + dnf -y install \ + --disablerepo "*" \ + --enablerepo "${REPOLIST}" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best ${INSTALL_PKGS} && \ + dnf -y reinstall \ + --disablerepo "*" \ + --enablerepo "baseos" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best tzdata && \ groupadd \ --system \ --gid 1995 \ diff --git a/Dockerfiles/web-nginx-mysql/ol/Dockerfile b/Dockerfiles/web-nginx-mysql/ol/Dockerfile index 1a7fe78ec..74a06940a 100644 --- a/Dockerfiles/web-nginx-mysql/ol/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/ol/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM oraclelinux:8-slim @@ -47,8 +47,13 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ findutils \ glibc-locale-source \ supervisor" && \ - microdnf -y module enable mysql && \ - microdnf -y module enable php:8.2 nginx:1.24 && \ + microdnf -y module enable \ + --disablerepo "*" \ + --enablerepo "ol8_appstream" \ + --setopt=install_weak_deps=0 \ + --setopt=keepcache=0 \ + --best \ + --nodocs mysql php:8.2 nginx:1.24 && \ microdnf -y install \ --disablerepo="*" \ --enablerepo="ol8_baseos_latest" \ diff --git a/Dockerfiles/web-nginx-mysql/rhel/Dockerfile b/Dockerfiles/web-nginx-mysql/rhel/Dockerfile index 5d12b9721..0ea10029b 100644 --- a/Dockerfiles/web-nginx-mysql/rhel/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/rhel/Dockerfile @@ -4,7 +4,7 @@ ARG RELEASE=30 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10 diff --git a/Dockerfiles/web-nginx-mysql/rhel/conf/etc/yum.repo.d/nginx.repo b/Dockerfiles/web-nginx-mysql/rhel/conf/etc/yum.repo.d/nginx.repo index 4a460fee8..212437f17 100644 --- a/Dockerfiles/web-nginx-mysql/rhel/conf/etc/yum.repo.d/nginx.repo +++ b/Dockerfiles/web-nginx-mysql/rhel/conf/etc/yum.repo.d/nginx.repo @@ -1,6 +1,6 @@ [nginx-stable] name=nginx stable repo -baseurl=http://nginx.org/packages/rhel/$releasever/$basearch/ +baseurl=https://nginx.org/packages/rhel/$releasever/$basearch/ gpgcheck=1 enabled=0 gpgkey=https://nginx.org/keys/nginx_signing.key diff --git a/Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile b/Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile index c2bc3ec2f..b042913f0 100644 --- a/Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM ubuntu:jammy diff --git a/Dockerfiles/web-nginx-pgsql/alpine/Dockerfile b/Dockerfiles/web-nginx-pgsql/alpine/Dockerfile index 92936b87e..57320bfc6 100644 --- a/Dockerfiles/web-nginx-pgsql/alpine/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/alpine/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:alpine-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM alpine:3.19 diff --git a/Dockerfiles/web-nginx-pgsql/centos/Dockerfile b/Dockerfiles/web-nginx-pgsql/centos/Dockerfile index 1c1337278..c733212e3 100644 --- a/Dockerfiles/web-nginx-pgsql/centos/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/centos/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:centos-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM quay.io/centos/centos:stream8 @@ -66,15 +66,15 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ --enablerepo "${REPOLIST}" \ --setopt=tsflags=nodocs \ --setopt=install_weak_deps=False \ - --setopt=keepcache=0 \ + --setopt=keepcache=False \ --best ${INSTALL_PKGS} && \ dnf -y reinstall \ - --disablerepo "*" \ - --enablerepo "baseos" \ - --setopt=tsflags=nodocs \ - --setopt=install_weak_deps=False \ - --best \ - tzdata && \ + --disablerepo "*" \ + --enablerepo "baseos" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best tzdata && \ groupadd \ --system \ --gid 1995 \ diff --git a/Dockerfiles/web-nginx-pgsql/ol/Dockerfile b/Dockerfiles/web-nginx-pgsql/ol/Dockerfile index 8c912f56b..ba0e26133 100644 --- a/Dockerfiles/web-nginx-pgsql/ol/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/ol/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:ol-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM oraclelinux:8-slim diff --git a/Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile b/Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile index 2fe978b44..587b5e1d6 100644 --- a/Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:ubuntu-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM ubuntu:jammy diff --git a/Dockerfiles/web-service/alpine/Dockerfile b/Dockerfiles/web-service/alpine/Dockerfile index fbde980ff..057a56aea 100644 --- a/Dockerfiles/web-service/alpine/Dockerfile +++ b/Dockerfiles/web-service/alpine/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM alpine:3.19 diff --git a/Dockerfiles/web-service/centos/Dockerfile b/Dockerfiles/web-service/centos/Dockerfile index 987a27fd7..afd68959a 100644 --- a/Dockerfiles/web-service/centos/Dockerfile +++ b/Dockerfiles/web-service/centos/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM quay.io/centos/centos:stream8 @@ -35,14 +35,27 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ REPOLIST="baseos,appstream,epel" && \ INSTALL_PKGS="bash \ chromium-headless" && \ - dnf -y install epel-release && \ dnf -y install \ - --disablerepo "*" \ - --enablerepo "${REPOLIST}" \ - --setopt=tsflags=nodocs \ - --setopt=install_weak_deps=False \ - --best \ - ${INSTALL_PKGS} && \ + --disablerepo "*" \ + --enablerepo "extras" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best epel-release && \ + dnf -y install \ + --disablerepo "*" \ + --enablerepo "${REPOLIST}" \ + --setopt=tsflags=nodocs \. + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best ${INSTALL_PKGS} && \ + dnf -y reinstall \ + --disablerepo "*" \ + --enablerepo "baseos" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --setopt=keepcache=False \ + --best tzdata && \ groupadd \ --system \ --gid 1995 \ diff --git a/Dockerfiles/web-service/ol/Dockerfile b/Dockerfiles/web-service/ol/Dockerfile index b15173b14..581ff69ac 100644 --- a/Dockerfiles/web-service/ol/Dockerfile +++ b/Dockerfiles/web-service/ol/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM oraclelinux:8-slim diff --git a/Dockerfiles/web-service/rhel/Dockerfile b/Dockerfiles/web-service/rhel/Dockerfile index 31d3eb747..0a43829cd 100644 --- a/Dockerfiles/web-service/rhel/Dockerfile +++ b/Dockerfiles/web-service/rhel/Dockerfile @@ -4,7 +4,7 @@ ARG RELEASE=30 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10 @@ -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 \ @@ -70,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-8-baseos-rpms" \ --enablerepo "ubi-8-appstream-rpms" \ diff --git a/Dockerfiles/web-service/ubuntu/Dockerfile b/Dockerfiles/web-service/ubuntu/Dockerfile index 8db2e47dc..e4a46207a 100644 --- a/Dockerfiles/web-service/ubuntu/Dockerfile +++ b/Dockerfiles/web-service/ubuntu/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.30 ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder FROM ubuntu:jammy