Updated Go lang on Ubuntu (noble), Nginx on RHEL like OS base images

This commit is contained in:
Alexey Pustovalov 2024-12-07 16:48:07 +09:00
parent da22cf7a78
commit 991a9b38df
8 changed files with 14 additions and 12 deletions

View File

@ -6,7 +6,7 @@ ARG ZBX_VERSION=${MAJOR_VERSION}
ENV TERM=xterm \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} \ ZBX_VERSION=${ZBX_VERSION} \
PATH=/usr/lib/go-1.22/bin:$PATH PATH=/usr/lib/go-1.23/bin:$PATH
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.description="Zabbix build base image contains all required packages to build Zabbix images" \ org.opencontainers.image.description="Zabbix build base image contains all required packages to build Zabbix images" \
@ -44,7 +44,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \
pkg-config \ pkg-config \
gettext \ gettext \
git \ git \
golang-1.22 \ golang-1.23 \
unzip \ unzip \
unixodbc-dev \ unixodbc-dev \
zlib1g-dev" && \ zlib1g-dev" && \

View File

@ -137,7 +137,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \ mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \
git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \ git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \
cd /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \ cd /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \
sed -i 's/go 1.2[0-9]/go 1.21/g' go.mod && \
make && \ make && \
strip /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb && \ strip /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb && \
cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mongodb && \ cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mongodb && \
@ -145,7 +144,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
cd /tmp/ && \ cd /tmp/ && \
git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \ git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \
cd /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \ cd /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \
sed -i 's/go 1.2[0-9]/go 1.21/g' go.mod && \
make && \ make && \
strip /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql && \ strip /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql && \
cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/postgresql && \ cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/postgresql && \
@ -153,7 +151,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
cd /tmp/ && \ cd /tmp/ && \
git -c advice.detachedHead=false clone ${MSSQL_PLUGIN_SOURCES} --branch ${MSSQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \ git -c advice.detachedHead=false clone ${MSSQL_PLUGIN_SOURCES} --branch ${MSSQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \
cd /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \ cd /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \
sed -i 's/go 1.2[0-9]/go 1.21/g' go.mod && \
make && \ make && \
strip /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql && \ strip /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql && \
cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mssql && \ cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mssql && \
@ -161,7 +158,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
cd /tmp/ && \ cd /tmp/ && \
git -c advice.detachedHead=false clone ${EMBER_PLUS_PLUGIN_SOURCES} --branch ${EMBER_PLUS_PLUGIN_VERSION} --depth 1 --single-branch /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \ git -c advice.detachedHead=false clone ${EMBER_PLUS_PLUGIN_SOURCES} --branch ${EMBER_PLUS_PLUGIN_VERSION} --depth 1 --single-branch /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \
cd /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \ cd /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \
sed -i 's/go 1.2[0-9]/go 1.21/g' go.mod && \
make && \ make && \
strip /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus && \ strip /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus && \
cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ember-plus && \ cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ember-plus && \

View File

@ -53,7 +53,8 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--enablerepo "appstream" \ --enablerepo "appstream" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--setopt=keepcache=0 \ --setopt=keepcache=0 \
php:8.2 && \ php:8.2 \
nginx:1.24 && \
microdnf -y install \ microdnf -y install \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "extras-common" \ --enablerepo "extras-common" \

View File

@ -53,7 +53,8 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--enablerepo "ol9_appstream" \ --enablerepo "ol9_appstream" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--setopt=keepcache=0 \ --setopt=keepcache=0 \
php:8.2 && \ php:8.2 \
nginx:1.24 && \
microdnf -y install \ microdnf -y install \
--disablerepo="*" \ --disablerepo="*" \
--enablerepo="ol9_baseos_latest" \ --enablerepo="ol9_baseos_latest" \

View File

@ -77,7 +77,8 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--enablerepo "rhel-9-for-$ARCH_SUFFIX-appstream-rpms" \ --enablerepo "rhel-9-for-$ARCH_SUFFIX-appstream-rpms" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--setopt=keepcache=0 \ --setopt=keepcache=0 \
php:8.2 && \ php:8.2 \
nginx:1.24 && \
microdnf -y install \ microdnf -y install \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "ubi-9-baseos-rpms" \ --enablerepo "ubi-9-baseos-rpms" \

View File

@ -61,7 +61,8 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--setopt=keepcache=0 \ --setopt=keepcache=0 \
php:8.2 \ php:8.2 \
postgresql:16 && \ postgresql:16 \
nginx:1.24 && \
microdnf -y install \ microdnf -y install \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "baseos" \ --enablerepo "baseos" \

View File

@ -54,7 +54,8 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--setopt=keepcache=0 \ --setopt=keepcache=0 \
php:8.2 \ php:8.2 \
postgresql:16 && \ postgresql:16 \
nginx:1.24 && \
microdnf -y install \ microdnf -y install \
--disablerepo="*" \ --disablerepo="*" \
--enablerepo="ol9_baseos_latest" \ --enablerepo="ol9_baseos_latest" \

View File

@ -78,7 +78,8 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--setopt=keepcache=0 \ --setopt=keepcache=0 \
php:8.2 \ php:8.2 \
postgresql:16 && \ postgresql:16 \
nginx:1.24 && \
microdnf -y install \ microdnf -y install \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "ubi-9-baseos-rpms" \ --enablerepo "ubi-9-baseos-rpms" \