All images updated to latest stable base images Alpine 3.12, Ubuntu 20 (focal), CentOS 8

This commit is contained in:
Alexey Pustovalov
2020-08-06 16:22:01 -04:00
parent 2c9656a679
commit 009c55d34f
38 changed files with 214 additions and 378 deletions

View File

@ -1,4 +1,4 @@
FROM alpine:3.11
FROM alpine:3.12
LABEL org.opencontainers.image.title="Zabbix proxy (MySQL)" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
@ -36,7 +36,7 @@ RUN set -eux && \
libcurl \
libevent \
libldap \
libssh2 \
libssh \
libxml2 \
mariadb-client \
mariadb-connector-c \
@ -68,7 +68,7 @@ RUN set -eux && \
g++ \
git \
make \
libssh2-dev \
libssh-dev \
libxml2-dev \
mysql-dev \
net-snmp-dev \
@ -97,7 +97,7 @@ RUN set -eux && \
--with-net-snmp \
--with-openipmi \
--with-openssl \
--with-ssh2 \
--with-ssh \
--with-unixodbc \
--enable-ipv6 \
--silent && \

View File

@ -1,4 +1,4 @@
FROM centos:centos7
FROM centos:centos8
LABEL org.opencontainers.image.title="Zabbix proxy (MySQL)" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
@ -30,11 +30,12 @@ RUN set -eux && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /usr/share/doc/zabbix-proxy-mysql && \
yum --quiet makecache && \
yum -y install https://repo.zabbix.com/non-supported/rhel/7/x86_64/fping-3.10-1.el7.x86_64.rpm --setopt=tsflags=nodocs && \
yum -y install --setopt=tsflags=nodocs \
libcurl \
dnf --quiet makecache && \
dnf -y install http://repo.zabbix.com/non-supported/rhel/8/x86_64/fping-3.16-1.el8.x86_64.rpm --setopt=tsflags=nodocs && \
dnf -y install --setopt=tsflags=nodocs \
libcurl-minimal \
libevent \
libssh \
libxml2 \
mariadb \
net-snmp-libs \
@ -57,9 +58,9 @@ RUN set -eux && \
gpg --batch --verify /tmp/tini.asc /sbin/tini && \
rm -r "$GNUPGHOME" /tmp/tini.asc && \
chmod +x /sbin/tini && \
yum -y clean all && \
dnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /etc/udev/hwdb.bin /root/.pki
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
ARG MAJOR_VERSION=5.0
ARG ZBX_VERSION=${MAJOR_VERSION}
@ -73,14 +74,16 @@ LABEL org.opencontainers.image.documentation="https://www.zabbix.com/documentati
org.opencontainers.image.source="${ZBX_SOURCES}"
RUN set -eux && \
yum --quiet makecache && \
yum -y install --setopt=tsflags=nodocs \
sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/CentOS-PowerTools.repo && \
dnf --quiet makecache && \
dnf -y install --setopt=tsflags=nodocs \
autoconf \
automake \
gcc \
pcre-devel \
libcurl-devel \
libevent-devel \
libssh2-devel \
libssh-devel \
libxml2-devel \
make \
mariadb-devel \
@ -110,7 +113,7 @@ RUN set -eux && \
--with-net-snmp \
--with-openipmi \
--with-openssl \
--with-ssh2 \
--with-ssh \
--with-unixodbc \
--enable-ipv6 \
--silent && \
@ -128,10 +131,11 @@ RUN set -eux && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
yum -y history undo `yum -q history | sed -n 3p |column -t | cut -d' ' -f1` && \
yum -y clean all && \
dnf -y history undo `dnf -q history | sed -n 3p |column -t | cut -d' ' -f1` && \
dnf -y clean all && \
sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/CentOS-PowerTools.repo && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /etc/udev/hwdb.bin /root/.pki
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
EXPOSE 10051/TCP

View File

@ -1,4 +1,4 @@
FROM ubuntu:bionic
FROM ubuntu:focal
LABEL org.opencontainers.image.title="Zabbix proxy (MySQL)" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
@ -9,8 +9,6 @@ LABEL org.opencontainers.image.title="Zabbix proxy (MySQL)" \
STOPSIGNAL SIGTERM
ENV TINI_VERSION=v0.19.0
RUN set -eux && \
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
addgroup --system --gid 1995 --quiet zabbix && \
@ -35,39 +33,21 @@ RUN set -eux && \
mkdir -p /usr/share/doc/zabbix-proxy-mysql && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
curl \
tini \
ca-certificates \
gpg \
dirmngr \
gpg-agent \
fping \
libcurl4 \
libevent-2.1 \
libmysqlclient20 \
libmysqlclient21 \
libopenipmi0 \
libpcre3 \
libsnmp30 \
libssh2-1 \
libsnmp35 \
libssh-4 \
libssl1.1 \
libxml2 \
mysql-client \
snmp-mibs-downloader \
unixodbc && \
curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini" -o /sbin/tini && \
curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini.asc" -o /tmp/tini.asc && \
export GNUPGHOME="$(mktemp -d)" && \
for server in $(shuf -e ha.pool.sks-keyservers.net \
hkp://p80.pool.sks-keyservers.net:80 \
ipv4.pool.sks-keyservers.net \
keyserver.ubuntu.com \
keyserver.pgp.com \
pgp.mit.edu) ; do \
gpg --keyserver "$server" --recv-keys 595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7 && break || : ; \
done && \
gpg --batch --verify /tmp/tini.asc /sbin/tini && \
rm -r "$GNUPGHOME" /tmp/tini.asc && \
chmod +x /sbin/tini && \
apt-get -y purge curl gpg dirmngr gpg-agent && \
apt-get -y autoremove && \
apt-get -y clean && \
rm -rf /var/lib/apt/lists/*
@ -97,7 +77,7 @@ RUN set -eux && \
libopenipmi-dev \
libpcre3-dev \
libsnmp-dev \
libssh2-1-dev \
libssh-dev \
libxml2-dev \
make \
pkg-config \
@ -124,7 +104,7 @@ RUN set -eux && \
--with-net-snmp \
--with-openipmi \
--with-openssl \
--with-ssh2 \
--with-ssh \
--with-unixodbc \
--enable-ipv6 \
--silent && \
@ -154,15 +134,14 @@ RUN set -eux && \
libopenipmi-dev \
libpcre3-dev \
libsnmp-dev \
libssh2-1-dev \
libssh-dev \
libxml2-dev \
make \
pkg-config \
git \
unixodbc-dev && \
apt-get -y autoremove && \
rm -rf /var/lib/apt/lists/* && \
chmod +x /sbin/tini
rm -rf /var/lib/apt/lists/*
EXPOSE 10051/TCP
@ -172,7 +151,7 @@ VOLUME ["/var/lib/zabbix/snmptraps"]
COPY ["docker-entrypoint.sh", "/usr/bin/"]
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/docker-entrypoint.sh"]
ENTRYPOINT ["/usr/bin/tini", "--", "/usr/bin/docker-entrypoint.sh"]
USER 1997