Added modbus support for RHEL like systems

This commit is contained in:
Alexey Pustovalov 2024-02-26 14:19:58 +09:00 committed by Alexey Pustovalov
parent 84bf0852d5
commit ec6c4fa544
17 changed files with 31 additions and 10 deletions

View File

@ -40,6 +40,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
iputils \
pcre2 \
libcurl-minimal \
libmodbus \
openssl-libs \
zlib" && \
dnf -y install epel-release && \

View File

@ -40,6 +40,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
iputils \
pcre2 \
libcurl \
libmodbus \
openssl-libs \
zlib" && \
microdnf -y install \

View File

@ -58,6 +58,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
iputils \
shadow-utils \
pcre2 \
libmodbus \
libcurl" && \
curl --tlsv1.2 -sSf -L -o /tmp/epel-release-latest-8.noarch.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \
rpm -ivh /tmp/epel-release-latest-8.noarch.rpm && \

View File

@ -45,6 +45,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
iputils \
pcre2 \
libcurl-minimal \
libmodbus \
smartmontools \
sudo \
openssl-libs" && \

View File

@ -45,6 +45,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
iputils \
pcre2 \
libcurl \
libmodbus \
smartmontools \
sudo \
openssl-libs" && \

View File

@ -65,6 +65,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
pcre2 \
smartmontools \
sudo \
libmodbus \
libcurl" && \
curl --tlsv1.2 -sSf -L -o /tmp/epel-release-latest-8.noarch.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \
rpm -ivh /tmp/epel-release-latest-8.noarch.rpm && \

View File

@ -19,7 +19,7 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
set -eux && \
REPOLIST="baseos,appstream,powertools" && \
REPOLIST="baseos,appstream,powertools,epel" && \
INSTALL_PKGS="autoconf \
automake \
bash \
@ -29,6 +29,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
libcurl-devel \
libevent-devel \
libssh-devel \
libmodbus-devel \
libxml2-devel \
openssl-devel \
openldap-devel \
@ -45,6 +46,12 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
go-toolset \
unixODBC-devel" && \
dnf -y module enable mysql && \
dnf -y install \
--disablerepo "*" \
--enablerepo "extras" \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
--best epel-release && \
dnf -y install \
--disablerepo "*" \
--enablerepo "${REPOLIST}" \

View File

@ -17,6 +17,8 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
set -eux && \
INSTALL_PKGS="autoconf \
@ -29,6 +31,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
libcurl-devel \
libevent-devel \
libssh-devel \
libmodbus-devel \
libxml2-devel \
openssl-devel \
openldap-devel \
@ -50,6 +53,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--enablerepo "ol8_baseos_latest" \
--enablerepo "ol8_appstream" \
--enablerepo "ol8_codeready_builder" \
--enablerepo="ol8_developer_EPEL" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \

View File

@ -41,6 +41,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
libcurl-devel \
libevent-devel \
libssh-devel \
libmodbus-devel \
libxml2-devel \
openssl-devel \
openldap-devel \
@ -55,6 +56,9 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
git \
gettext \
unixODBC-devel" && \
curl -sSL -o /tmp/epel-release-latest-8.noarch.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \
rpm -ivh /tmp/epel-release-latest-8.noarch.rpm && \
rm -rf /tmp/epel-release-latest-8.noarch.rpm && \
microdnf -y module enable mysql && \
microdnf -y install \
--disablerepo "*" \
@ -63,6 +67,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--enablerepo "rhel-8-for-x86_64-baseos-rpms" \
--enablerepo "rhel-8-for-x86_64-appstream-rpms" \
--enablerepo "codeready-builder-for-rhel-8-x86_64-rpms" \
--enablerepo "epel" \
--setopt=install_weak_deps=0 \
--setopt=keepcache=0 \
--best \

View File

@ -50,8 +50,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-webservice \
--with-ldap \
--with-libcurl \
# Not available for CentOS 8
# --with-libmodbus \
--with-libmodbus \
--with-libpcre2 \
--with-libxml2 \
--with-mysql \

View File

@ -51,7 +51,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-webservice \
--with-ldap \
--with-libcurl \
# --with-libmodbus \
--with-libmodbus \
--with-libpcre2 \
--with-libxml2 \
--with-mysql \

View File

@ -60,7 +60,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-webservice \
--with-ldap \
--with-libcurl \
# --with-libmodbus \
--with-libmodbus \
--with-libpcre2 \
--with-libxml2 \
--with-mysql \

View File

@ -50,7 +50,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-webservice \
--with-ldap \
--with-libcurl \
# --with-libmodbus \
--with-libmodbus \
--with-libpcre2 \
--with-libxml2 \
--with-net-snmp \

View File

@ -51,7 +51,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-webservice \
--with-ldap \
--with-libcurl \
# --with-libmodbus \
--with-libmodbus \
--with-libpcre2 \
--with-libxml2 \
--with-net-snmp \

View File

@ -46,7 +46,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-proxy \
--with-ldap \
--with-libcurl \
# --with-libmodbus \
--with-libmodbus \
--with-libpcre2 \
--with-libxml2 \
--with-net-snmp \

View File

@ -47,7 +47,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-proxy \
--with-ldap \
--with-libcurl \
# --with-libmodbus \
--with-libmodbus \
--with-libpcre2 \
--with-libxml2 \
--with-net-snmp \

View File

@ -56,7 +56,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-proxy \
--with-ldap \
--with-libcurl \
# --with-libmodbus \
--with-libmodbus \
--with-libpcre2 \
--with-libxml2 \
--with-net-snmp \