Updated Alpine to 3.19

This commit is contained in:
Alexey Pustovalov 2023-12-13 14:29:00 +09:00
parent 4c547adf37
commit e0f02f3e56
23 changed files with 89 additions and 39 deletions

View File

@ -5,7 +5,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} as builder
FROM alpine:3.18
FROM alpine:3.19
ARG MAJOR_VERSION
ARG ZBX_VERSION

View File

@ -5,7 +5,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} as builder
FROM alpine:3.18
FROM alpine:3.19
ARG MAJOR_VERSION
ARG ZBX_VERSION

View File

@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM alpine:3.18
FROM alpine:3.19
ARG MAJOR_VERSION=7.0
ARG ZBX_VERSION=${MAJOR_VERSION}

View File

@ -23,6 +23,7 @@ ENV MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git MONGODB_PLU
POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git POSTGRESQL_PLUGIN_VERSION=master
COPY ["conf/chromedp_no_sandbox.patch", "/tmp/chromedp_no_sandbox.patch"]
COPY ["conf/agent2_build.patch", "/tmp/agent2_build.patch"]
RUN set -eux && \
ARCH_SUFFIX="$(arch)"; \
@ -48,6 +49,7 @@ RUN set -eux && \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
cd /tmp/zabbix-${ZBX_VERSION} && \
patch -p1 < /tmp/chromedp_no_sandbox.patch && \
patch -p1 < /tmp/agent2_build.patch && \
zabbix_revision=`git rev-parse --short HEAD` && \
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/go/pkg/version/version.go && \

View File

@ -0,0 +1,13 @@
diff --git a/src/go/Makefile.am b/src/go/Makefile.am
index 2dd9e84e4ea..74bc3fbb91e 100644
--- a/src/go/Makefile.am
+++ b/src/go/Makefile.am
@@ -49,7 +49,7 @@ endif
all: build
zabbix.com/cmd/zabbix_agent2:
- CGO_CFLAGS="${CGO_CFLAGS}" CGO_LDFLAGS="${CGO_LDFLAGS}" go build -tags="${AGENT_GOTAGS}" -ldflags="${AGENT_GOLDFLAGS}" -o bin zabbix.com/cmd/zabbix_agent2
+ CGO_CFLAGS="${CGO_CFLAGS} -D_LARGEFILE64_SOURCE" CGO_LDFLAGS="${CGO_LDFLAGS}" go build -tags="${AGENT_GOTAGS}" -ldflags="${AGENT_GOLDFLAGS}" -o bin zabbix.com/cmd/zabbix_agent2
zabbix.com/cmd/zabbix_web_service:
go build -ldflags="${WEBSERVICE_GOLDFLAGS}" -o bin zabbix.com/cmd/zabbix_web_service

View File

@ -23,6 +23,7 @@ ENV MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git MONGODB_PLU
POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git POSTGRESQL_PLUGIN_VERSION=master
COPY ["conf/chromedp_no_sandbox.patch", "/tmp/chromedp_no_sandbox.patch"]
COPY ["conf/agent2_build.patch", "/tmp/agent2_build.patch"]
RUN set -eux && \
ARCH_SUFFIX="$(arch)"; \
@ -48,6 +49,7 @@ RUN set -eux && \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
cd /tmp/zabbix-${ZBX_VERSION} && \
patch -p1 < /tmp/chromedp_no_sandbox.patch && \
patch -p1 < /tmp/agent2_build.patch && \
zabbix_revision=`git rev-parse --short HEAD` && \
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/go/pkg/version/version.go && \

View File

@ -0,0 +1,13 @@
diff --git a/src/go/Makefile.am b/src/go/Makefile.am
index 2dd9e84e4ea..74bc3fbb91e 100644
--- a/src/go/Makefile.am
+++ b/src/go/Makefile.am
@@ -49,7 +49,7 @@ endif
all: build
zabbix.com/cmd/zabbix_agent2:
- CGO_CFLAGS="${CGO_CFLAGS}" CGO_LDFLAGS="${CGO_LDFLAGS}" go build -tags="${AGENT_GOTAGS}" -ldflags="${AGENT_GOLDFLAGS}" -o bin zabbix.com/cmd/zabbix_agent2
+ CGO_CFLAGS="${CGO_CFLAGS} -D_LARGEFILE64_SOURCE" CGO_LDFLAGS="${CGO_LDFLAGS}" go build -tags="${AGENT_GOTAGS}" -ldflags="${AGENT_GOLDFLAGS}" -o bin zabbix.com/cmd/zabbix_agent2
zabbix.com/cmd/zabbix_web_service:
go build -ldflags="${WEBSERVICE_GOLDFLAGS}" -o bin zabbix.com/cmd/zabbix_web_service

View File

@ -22,6 +22,8 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
ENV MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git MONGODB_PLUGIN_VERSION=master \
POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git POSTGRESQL_PLUGIN_VERSION=master
COPY ["conf/agent2_build.patch", "/tmp/agent2_build.patch"]
RUN set -eux && \
ARCH_SUFFIX="$(arch)"; \
case "$ARCH_SUFFIX" in \
@ -45,6 +47,7 @@ RUN set -eux && \
cd /tmp/ && \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
cd /tmp/zabbix-${ZBX_VERSION} && \
patch -p1 < /tmp/agent2_build.patch && \
zabbix_revision=`git rev-parse --short HEAD` && \
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/go/pkg/version/version.go && \

View File

@ -0,0 +1,13 @@
diff --git a/src/go/Makefile.am b/src/go/Makefile.am
index 2dd9e84e4ea..74bc3fbb91e 100644
--- a/src/go/Makefile.am
+++ b/src/go/Makefile.am
@@ -49,7 +49,7 @@ endif
all: build
zabbix.com/cmd/zabbix_agent2:
- CGO_CFLAGS="${CGO_CFLAGS}" CGO_LDFLAGS="${CGO_LDFLAGS}" go build -tags="${AGENT_GOTAGS}" -ldflags="${AGENT_GOLDFLAGS}" -o bin zabbix.com/cmd/zabbix_agent2
+ CGO_CFLAGS="${CGO_CFLAGS} -D_LARGEFILE64_SOURCE" CGO_LDFLAGS="${CGO_LDFLAGS}" go build -tags="${AGENT_GOTAGS}" -ldflags="${AGENT_GOLDFLAGS}" -o bin zabbix.com/cmd/zabbix_agent2
zabbix.com/cmd/zabbix_web_service:
go build -ldflags="${WEBSERVICE_GOLDFLAGS}" -o bin zabbix.com/cmd/zabbix_web_service

View File

@ -5,7 +5,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} as builder
FROM alpine:3.18
FROM alpine:3.19
ARG MAJOR_VERSION
ARG ZBX_VERSION

View File

@ -5,7 +5,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} as builder
FROM alpine:3.18
FROM alpine:3.19
ARG MAJOR_VERSION
ARG ZBX_VERSION

View File

@ -5,7 +5,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-sqlite3:alpine-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} as builder
FROM alpine:3.18
FROM alpine:3.19
ARG MAJOR_VERSION
ARG ZBX_VERSION

View File

@ -5,7 +5,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} as builder
FROM alpine:3.18
FROM alpine:3.19
ARG MAJOR_VERSION
ARG ZBX_VERSION

View File

@ -5,7 +5,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:alpine-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} as builder
FROM alpine:3.18
FROM alpine:3.19
ARG MAJOR_VERSION
ARG ZBX_VERSION

View File

@ -1,4 +1,4 @@
FROM alpine:3.18
FROM alpine:3.19
ARG MAJOR_VERSION=7.0
ARG ZBX_VERSION=${MAJOR_VERSION}

View File

@ -5,7 +5,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} as builder
FROM alpine:3.18
FROM alpine:3.19
ARG MAJOR_VERSION
ARG ZBX_VERSION

View File

@ -5,7 +5,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:alpine-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} as builder
FROM alpine:3.18
FROM alpine:3.19
ARG MAJOR_VERSION
ARG ZBX_VERSION

View File

@ -5,7 +5,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} as builder
FROM alpine:3.18
FROM alpine:3.19
ARG MAJOR_VERSION
ARG ZBX_VERSION

View File

@ -5,7 +5,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:alpine-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} as builder
FROM alpine:3.18
FROM alpine:3.19
ARG MAJOR_VERSION
ARG ZBX_VERSION

View File

@ -5,7 +5,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} as builder
FROM alpine:3.18
FROM alpine:3.19
ARG MAJOR_VERSION
ARG ZBX_VERSION

View File

@ -454,6 +454,7 @@ services:
# - root-ca.pem
stop_grace_period: 1m
networks:
zbx_net_frontend:
zbx_net_backend:
aliases:
- mysql-server

View File

@ -3,14 +3,14 @@ services:
build:
context: ./Dockerfiles/build-base/alpine
cache_from:
- alpine:3.18
- alpine:3.19
image: zabbix-build-base:alpine-local
zabbix-build-mysql:
build:
context: ./Dockerfiles/build-mysql/alpine
cache_from:
- alpine:3.18
- alpine:3.19
args:
BUILD_BASE_IMAGE: zabbix-build-base:alpine-local
image: zabbix-build-mysql:alpine-local
@ -21,7 +21,7 @@ services:
build:
context: ./Dockerfiles/build-sqlite3/alpine
cache_from:
- alpine:3.18
- alpine:3.19
args:
BUILD_BASE_IMAGE: zabbix-build-base:alpine-local
image: zabbix-build-sqlite3:alpine-local
@ -34,7 +34,7 @@ services:
build:
context: ./Dockerfiles/server-mysql/alpine
cache_from:
- alpine:3.18
- alpine:3.19
args:
BUILD_BASE_IMAGE: zabbix-build-mysql:alpine-local
image: zabbix-server-mysql:alpine-local
@ -108,7 +108,7 @@ services:
build:
context: ./Dockerfiles/proxy-sqlite3/alpine
cache_from:
- alpine:3.18
- alpine:3.19
args:
BUILD_BASE_IMAGE: zabbix-build-sqlite3:alpine-local
image: zabbix-proxy-sqlite3:alpine-local
@ -165,7 +165,7 @@ services:
build:
context: ./Dockerfiles/proxy-mysql/alpine
cache_from:
- alpine:3.18
- alpine:3.19
args:
BUILD_BASE_IMAGE: zabbix-build-mysql:alpine-local
image: zabbix-proxy-mysql:alpine-local
@ -233,7 +233,7 @@ services:
build:
context: ./Dockerfiles/web-apache-mysql/alpine
cache_from:
- alpine:3.18
- alpine:3.19
args:
BUILD_BASE_IMAGE: zabbix-build-mysql:alpine-local
image: zabbix-web-apache-mysql:alpine-local
@ -297,7 +297,7 @@ services:
build:
context: ./Dockerfiles/web-nginx-mysql/alpine
cache_from:
- alpine:3.18
- alpine:3.19
args:
BUILD_BASE_IMAGE: zabbix-build-mysql:alpine-local
image: zabbix-web-nginx-mysql:alpine-local
@ -359,7 +359,7 @@ services:
build:
context: ./Dockerfiles/agent/alpine
cache_from:
- alpine:3.18
- alpine:3.19
args:
BUILD_BASE_IMAGE: zabbix-build-mysql:alpine-local
image: zabbix-agent:alpine-local
@ -408,7 +408,7 @@ services:
build:
context: ./Dockerfiles/java-gateway/alpine
cache_from:
- alpine:3.18
- alpine:3.19
args:
BUILD_BASE_IMAGE: zabbix-build-mysql:alpine-local
image: zabbix-java-gateway:alpine-local
@ -445,7 +445,7 @@ services:
build:
context: ./Dockerfiles/snmptraps/alpine
cache_from:
- alpine:3.18
- alpine:3.19
image: zabbix-snmptraps:alpine-local
# Override snmptrapd command arguments to receive SNMP traps by DNS
# It must be done with ZBX_SNMP_TRAP_USE_DNS=true environment variable
@ -483,7 +483,7 @@ services:
build:
context: ./Dockerfiles/web-service/alpine
cache_from:
- alpine:3.18
- alpine:3.19
args:
BUILD_BASE_IMAGE: zabbix-build-mysql:alpine-local
image: zabbix-web-service:alpine-local
@ -538,6 +538,8 @@ services:
# - dbsocket:/var/run/mysqld/
env_file:
- ./env_vars/.env_db_mysql
ports:
- "3306:3306/tcp"
secrets:
- MYSQL_USER
- MYSQL_PASSWORD
@ -547,6 +549,7 @@ services:
# - root-ca.pem
stop_grace_period: 1m
networks:
zbx_net_frontend:
zbx_net_backend:
aliases:
- mysql-server

View File

@ -4,14 +4,14 @@ services:
build:
context: ./Dockerfiles/build-base/alpine
cache_from:
- alpine:3.18
- alpine:3.19
image: zabbix-build-base:alpine-local
zabbix-build-pgsql:
build:
context: ./Dockerfiles/build-pgsql/alpine
cache_from:
- alpine:3.18
- alpine:3.19
args:
BUILD_BASE_IMAGE: zabbix-build-base:alpine-local
image: zabbix-build-pgsql:alpine-local
@ -22,7 +22,7 @@ services:
build:
context: ./Dockerfiles/build-mysql/alpine
cache_from:
- alpine:3.18
- alpine:3.19
args:
BUILD_BASE_IMAGE: zabbix-build-base:alpine-local
image: zabbix-build-mysql:alpine-local
@ -35,7 +35,7 @@ services:
build:
context: ./Dockerfiles/build-sqlite3/alpine
cache_from:
- alpine:3.18
- alpine:3.19
args:
BUILD_BASE_IMAGE: zabbix-build-base:alpine-local
image: zabbix-build-sqlite3:alpine-local
@ -48,7 +48,7 @@ services:
build:
context: ./Dockerfiles/server-pgsql/alpine
cache_from:
- alpine:3.18
- alpine:3.19
args:
BUILD_BASE_IMAGE: zabbix-build-pgsql:alpine-local
image: zabbix-server-pgsql:alpine-local
@ -119,7 +119,7 @@ services:
build:
context: ./Dockerfiles/proxy-sqlite3/alpine
cache_from:
- alpine:3.18
- alpine:3.19
args:
BUILD_BASE_IMAGE: zabbix-build-sqlite3:alpine-local
image: zabbix-proxy-sqlite3:alpine-local
@ -176,7 +176,7 @@ services:
build:
context: ./Dockerfiles/proxy-mysql/alpine
cache_from:
- alpine:3.18
- alpine:3.19
args:
BUILD_BASE_IMAGE: zabbix-build-mysql:alpine-local
image: zabbix-proxy-mysql:alpine-local
@ -240,7 +240,7 @@ services:
build:
context: ./Dockerfiles/web-apache-pgsql/alpine
cache_from:
- alpine:3.18
- alpine:3.19
args:
BUILD_BASE_IMAGE: zabbix-build-pgsql:alpine-local
image: zabbix-web-apache-pgsql:alpine-local
@ -303,7 +303,7 @@ services:
build:
context: ./Dockerfiles/web-nginx-pgsql/alpine
cache_from:
- alpine:3.18
- alpine:3.19
args:
BUILD_BASE_IMAGE: zabbix-build-pgsql:alpine-local
image: zabbix-web-nginx-pgsql:alpine-local
@ -364,7 +364,7 @@ services:
build:
context: ./Dockerfiles/agent/alpine
cache_from:
- alpine:3.18
- alpine:3.19
args:
BUILD_BASE_IMAGE: zabbix-build-pgsql:alpine-local
image: zabbix-agent:alpine-local
@ -413,7 +413,7 @@ services:
build:
context: ./Dockerfiles/java-gateway/alpine
cache_from:
- alpine:3.18
- alpine:3.19
args:
BUILD_BASE_IMAGE: zabbix-build-pgsql:alpine-local
image: zabbix-java-gateway:alpine-local
@ -450,7 +450,7 @@ services:
build:
context: ./Dockerfiles/snmptraps/alpine
cache_from:
- alpine:3.18
- alpine:3.19
image: zabbix-snmptraps:alpine-local
# Override snmptrapd command arguments to receive SNMP traps by DNS
# It must be done with ZBX_SNMP_TRAP_USE_DNS=true environment variable
@ -488,7 +488,7 @@ services:
build:
context: ./Dockerfiles/web-service/alpine
cache_from:
- alpine:3.18
- alpine:3.19
args:
BUILD_BASE_IMAGE: zabbix-build-pgsql:alpine-local
image: zabbix-web-service:alpine-local