diff --git a/agent/centos/Dockerfile b/agent/centos/Dockerfile index d03564130..cefd44718 100644 --- a/agent/centos/Dockerfile +++ b/agent/centos/Dockerfile @@ -52,6 +52,7 @@ ARG ZBX_VERSION=${MAJOR_VERSION}.11 ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/ ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ZBX_TYPE=agent ZBX_DB_TYPE=none ZBX_OPT_TYPE=none +ENV TINI_VERSION v0.18.0 LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-centos" \ org.label-schema.vendor="Zabbix LLC" \ @@ -72,6 +73,7 @@ COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd /u COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get /usr/bin/zabbix_get COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/conf/zabbix_agentd.conf /etc/zabbix/zabbix_agentd.conf +ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /sbin/tini RUN groupadd --system zabbix && \ adduser -r --shell /sbin/nologin \ @@ -89,7 +91,8 @@ RUN groupadd --system zabbix && \ libldap \ openssl-libs && \ yum ${YUM_FLAGS_PERSISTENT} clean all && \ - rm -rf /var/cache/yum + rm -rf /var/cache/yum && \ + chmod +x /sbin/tini EXPOSE 10050/TCP @@ -99,4 +102,6 @@ VOLUME ["/etc/zabbix/zabbix_agentd.d", "/var/lib/zabbix/enc", "/var/lib/zabbix/m COPY ["docker-entrypoint.sh", "/usr/bin/"] -ENTRYPOINT ["docker-entrypoint.sh"] +ENTRYPOINT ["/sbin/tini", "--"] + +CMD ["docker-entrypoint.sh"] diff --git a/proxy-mysql/centos/Dockerfile b/proxy-mysql/centos/Dockerfile index 314fee108..2064dbdca 100644 --- a/proxy-mysql/centos/Dockerfile +++ b/proxy-mysql/centos/Dockerfile @@ -69,6 +69,7 @@ ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/ ENV TERM=xterm MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \ ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ZBX_TYPE=proxy ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=none +ENV TINI_VERSION v0.18.0 LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}-centos" \ org.label-schema.vendor="Zabbix LLC" \ @@ -90,6 +91,7 @@ COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get /usr/bi COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/conf/zabbix_${ZBX_TYPE}.conf /etc/zabbix/zabbix_${ZBX_TYPE}.conf COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/database/${ZBX_DB_TYPE}/create.sql.gz /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}/create.sql.gz +ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /sbin/tini RUN groupadd --system zabbix && \ adduser -r --shell /sbin/nologin \ @@ -124,7 +126,8 @@ RUN groupadd --system zabbix && \ pcre \ unixODBC && \ yum ${YUM_FLAGS_PERSISTANT} clean all && \ - rm -rf /var/cache/yum/ + rm -rf /var/cache/yum/ && \ + chmod +x /sbin/tini EXPOSE 10051/TCP @@ -135,4 +138,6 @@ VOLUME ["/var/lib/zabbix/ssh_keys", "/var/lib/zabbix/ssl/certs", "/var/lib/zabbi COPY ["docker-entrypoint.sh", "/usr/bin/"] -ENTRYPOINT ["docker-entrypoint.sh"] +ENTRYPOINT ["/sbin/tini", "--"] + +CMD ["docker-entrypoint.sh"] diff --git a/proxy-sqlite3/centos/Dockerfile b/proxy-sqlite3/centos/Dockerfile index 37b3a4020..0fa1414c8 100644 --- a/proxy-sqlite3/centos/Dockerfile +++ b/proxy-sqlite3/centos/Dockerfile @@ -69,6 +69,7 @@ ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/ ENV TERM=xterm MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \ ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ZBX_TYPE=proxy ZBX_DB_TYPE=sqlite3 ZBX_OPT_TYPE=none +ENV TINI_VERSION v0.18.0 LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}-centos" \ org.label-schema.vendor="Zabbix LLC" \ @@ -90,6 +91,7 @@ COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get /usr/bi COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/conf/zabbix_${ZBX_TYPE}.conf /etc/zabbix/zabbix_${ZBX_TYPE}.conf COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/database/${ZBX_DB_TYPE}/create.sql.gz /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}/create.sql.gz +ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /sbin/tini RUN groupadd --system zabbix && \ adduser -r --shell /sbin/nologin \ @@ -123,7 +125,8 @@ RUN groupadd --system zabbix && \ pcre \ unixODBC && \ yum ${YUM_FLAGS_PERSISTENT} clean all && \ - rm -rf /var/cache/yum/ + rm -rf /var/cache/yum/ && \ + chmod +x /sbin/tini EXPOSE 10051/TCP @@ -134,4 +137,6 @@ VOLUME ["/var/lib/zabbix/ssh_keys", "/var/lib/zabbix/ssl/certs", "/var/lib/zabbi COPY ["docker-entrypoint.sh", "/usr/bin/"] -ENTRYPOINT ["docker-entrypoint.sh"] +ENTRYPOINT ["/sbin/tini", "--"] + +CMD ["docker-entrypoint.sh"] diff --git a/server-mysql/centos/Dockerfile b/server-mysql/centos/Dockerfile index 1f263ab9e..cd6b73224 100644 --- a/server-mysql/centos/Dockerfile +++ b/server-mysql/centos/Dockerfile @@ -10,12 +10,12 @@ ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ZBX_TYPE=server ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=none RUN yum --quiet makecache && \ - yum ${YUM_FLAGS_DEV} install epel-release && \ + yum ${YUM_FLAGS_DEV} install http://repo.zabbix.com/non-supported/rhel/7/x86_64/iksemel-devel-1.4-2.el7.centos.x86_64.rpm \ + http://repo.zabbix.com/non-supported/rhel/7/x86_64/iksemel-1.4-2.el7.centos.x86_64.rpm && \ yum ${YUM_FLAGS_DEV} install \ autoconf \ automake \ gcc \ - iksemel-devel \ libcurl-devel \ libssh2-devel \ libxml2-devel \ @@ -74,6 +74,7 @@ ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/ ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ TERM=xterm MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \ ZBX_TYPE=server ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=none +ENV TINI_VERSION v0.18.0 LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}-centos" \ org.label-schema.vendor="Zabbix LLC" \ @@ -95,6 +96,7 @@ COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get /usr/bi COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/conf/zabbix_${ZBX_TYPE}.conf /etc/zabbix/zabbix_${ZBX_TYPE}.conf COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/database/${ZBX_DB_TYPE}/create.sql.gz /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}/create.sql.gz +ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /sbin/tini RUN groupadd --system zabbix && \ adduser -r --shell /sbin/nologin \ @@ -117,10 +119,9 @@ RUN groupadd --system zabbix && \ chown --quiet -R zabbix:root /var/lib/zabbix && \ mkdir -p /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE} && \ yum ${YUM_FLAGS_COMMON} makecache && \ - yum ${YUM_FLAGS_PERSISTENT} install epel-release && \ + yum ${YUM_FLAGS_PERSISTENT} install http://repo.zabbix.com/non-supported/rhel/7/x86_64/iksemel-1.4-2.el7.centos.x86_64.rpm \ + http://repo.zabbix.com/non-supported/rhel/7/x86_64/fping-3.10-1.el7.x86_64.rpm && \ yum ${YUM_FLAGS_PERSISTENT} install \ - fping \ - iksemel \ libcurl \ libxml2 \ mariadb \ @@ -131,7 +132,8 @@ RUN groupadd --system zabbix && \ pcre \ unixODBC && \ yum ${YUM_FLAGS_PERSISTENT} clean all && \ - rm -rf /var/cache/yum/ + rm -rf /var/cache/yum/ && \ + chmod +x /sbin/tini EXPOSE 10051/TCP @@ -142,4 +144,7 @@ VOLUME ["/var/lib/zabbix/snmptraps", "/var/lib/zabbix/ssh_keys", "/var/lib/zabbi COPY ["docker-entrypoint.sh", "/usr/bin/"] -ENTRYPOINT ["docker-entrypoint.sh"] +ENTRYPOINT ["/sbin/tini", "--"] + +CMD ["docker-entrypoint.sh"] + diff --git a/server-pgsql/centos/Dockerfile b/server-pgsql/centos/Dockerfile index 7ff951f4c..c625d8d86 100644 --- a/server-pgsql/centos/Dockerfile +++ b/server-pgsql/centos/Dockerfile @@ -10,12 +10,12 @@ ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ZBX_TYPE=server ZBX_DB_TYPE=postgresql ZBX_OPT_TYPE=none RUN yum --quiet makecache && \ - yum ${YUM_FLAGS_DEV} install epel-release && \ + yum ${YUM_FLAGS_DEV} install http://repo.zabbix.com/non-supported/rhel/7/x86_64/iksemel-devel-1.4-2.el7.centos.x86_64.rpm \ + http://repo.zabbix.com/non-supported/rhel/7/x86_64/iksemel-1.4-2.el7.centos.x86_64.rpm && \ yum ${YUM_FLAGS_DEV} install \ autoconf \ automake \ gcc \ - iksemel-devel \ libcurl-devel \ libssh2-devel \ libxml2-devel \ @@ -74,6 +74,7 @@ ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/ ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ TERM=xterm MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \ ZBX_TYPE=server ZBX_DB_TYPE=postgresql ZBX_OPT_TYPE=none +ENV TINI_VERSION v0.18.0 LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}-centos" \ org.label-schema.vendor="Zabbix LLC" \ @@ -95,6 +96,7 @@ COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get /usr/bi COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/conf/zabbix_${ZBX_TYPE}.conf /etc/zabbix/zabbix_${ZBX_TYPE}.conf COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/database/${ZBX_DB_TYPE}/create.sql.gz /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}/create.sql.gz +ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /sbin/tini RUN groupadd --system zabbix && \ adduser -r --shell /sbin/nologin \ @@ -117,10 +119,9 @@ RUN groupadd --system zabbix && \ chown --quiet -R zabbix:root /var/lib/zabbix && \ mkdir -p /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE} && \ yum ${YUM_FLAGS_COMMON} makecache && \ - yum ${YUM_FLAGS_PERSISTENT} install epel-release && \ + yum ${YUM_FLAGS_PERSISTENT} install http://repo.zabbix.com/non-supported/rhel/7/x86_64/iksemel-1.4-2.el7.centos.x86_64.rpm \ + http://repo.zabbix.com/non-supported/rhel/7/x86_64/fping-3.10-1.el7.x86_64.rpm && \ yum ${YUM_FLAGS_PERSISTENT} install \ - fping \ - iksemel \ libcurl \ libxml2 \ net-snmp-libs \ @@ -132,7 +133,8 @@ RUN groupadd --system zabbix && \ postgresql-libs \ unixODBC && \ yum ${YUM_FLAGS_PERSISTENT} clean all && \ - rm -rf /var/cache/yum/ + rm -rf /var/cache/yum/ && \ + chmod +x /sbin/tini EXPOSE 10051/TCP @@ -143,4 +145,6 @@ VOLUME ["/var/lib/zabbix/snmptraps", "/var/lib/zabbix/ssh_keys", "/var/lib/zabbi COPY ["docker-entrypoint.sh", "/usr/bin/"] -ENTRYPOINT ["docker-entrypoint.sh"] +ENTRYPOINT ["/sbin/tini", "--"] + +CMD ["docker-entrypoint.sh"] diff --git a/zabbix-appliance/centos/Dockerfile b/zabbix-appliance/centos/Dockerfile index 30ef85848..ae7b8d661 100644 --- a/zabbix-appliance/centos/Dockerfile +++ b/zabbix-appliance/centos/Dockerfile @@ -12,14 +12,14 @@ ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ COPY ["conf/tmp/font-config", "/tmp/font-config"] -RUN yum ${YUM_FLAGS_DEV} install epel-release && \ - yum --quiet makecache && \ +RUN yum --quiet makecache && \ + yum ${YUM_FLAGS_DEV} install http://repo.zabbix.com/non-supported/rhel/7/x86_64/iksemel-devel-1.4-2.el7.centos.x86_64.rpm \ + http://repo.zabbix.com/non-supported/rhel/7/x86_64/iksemel-1.4-2.el7.centos.x86_64.rpm && \ yum ${YUM_FLAGS_DEV} install \ autoconf \ automake \ gcc \ gettext \ - iksemel-devel \ java-1.8.0-openjdk-devel \ libcurl-devel \ libssh2-devel \ @@ -91,6 +91,7 @@ ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ TERM=xterm MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \ ZBX_TYPE=server ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=nginx \ MYSQL_ALLOW_EMPTY_PASSWORD=true ZBX_ADD_SERVER=true ZBX_ADD_WEB=true DB_SERVER_HOST=localhost MYSQL_USER=zabbix ZBX_ADD_JAVA_GATEWAY=true ZBX_JAVAGATEWAY_ENABLE=true ZBX_JAVAGATEWAY=localhost +ENV TINI_VERSION v0.18.0 LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}-centos" \ org.label-schema.vendor="Zabbix LLC" \ @@ -117,6 +118,7 @@ COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/bin/ /usr/sbin/za COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/lib/ /usr/sbin/zabbix_java/lib/ COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/frontends/php/ /usr/share/zabbix/ +ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /sbin/tini RUN groupadd --system zabbix && \ adduser -r --shell /sbin/nologin \ @@ -139,12 +141,12 @@ RUN groupadd --system zabbix && \ chown --quiet -R zabbix:root /var/lib/zabbix && \ mkdir -p /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}/ && \ yum ${YUM_FLAGS_COMMON} makecache && \ + yum ${YUM_FLAGS_PERSISTENT} install http://repo.zabbix.com/non-supported/rhel/7/x86_64/iksemel-1.4-2.el7.centos.x86_64.rpm \ + http://repo.zabbix.com/non-supported/rhel/7/x86_64/fping-3.10-1.el7.x86_64.rpm && \ yum ${YUM_FLAGS_PERSISTENT} install epel-release && \ yum ${YUM_FLAGS_PERSISTENT} install \ OpenIPMI-libs \ dejavu-sans-fonts \ - fping \ - iksemel \ java-1.8.0-openjdk-headless \ libcurl \ libxml2 \ @@ -170,7 +172,8 @@ RUN groupadd --system zabbix && \ ls -lah /usr/share/zabbix/ && \ ln -s /usr/share/fonts/dejavu/DejaVuSans.ttf /usr/share/zabbix/fonts/graphfont.ttf && \ yum ${YUM_FLAGS_PERSISTENT} clean all && \ - rm -rf /var/cache/yum/ + rm -rf /var/cache/yum/ && \ + chmod +x /sbin/tini EXPOSE 80/TCP 443/TCP 10051/TCP @@ -193,4 +196,6 @@ COPY ["docker-entrypoint.sh", "/usr/bin/"] ENV ZBX_TYPE=appliance -ENTRYPOINT ["docker-entrypoint.sh"] +ENTRYPOINT ["/sbin/tini", "--"] + +CMD ["docker-entrypoint.sh"]