Fixed issue with init (PID 1)

This commit is contained in:
root 2019-04-09 19:17:07 +03:00
parent eae4397351
commit 23abd5eb86
6 changed files with 39 additions and 13 deletions

View File

@ -55,6 +55,7 @@ ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive TERM=xterm \
ZBX_TYPE=agent ZBX_DB_TYPE=none ZBX_OPT_TYPE=none \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
ENV TINI_VERSION v0.18.0
LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-ubuntu" \
org.label-schema.vendor="Zabbix LLC" \
@ -75,6 +76,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 locale-gen $LC_ALL && \
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
@ -95,7 +97,8 @@ RUN locale-gen $LC_ALL && \
libldap-2.4 && \
apt-get ${APT_FLAGS_COMMON} autoremove && \
apt-get ${APT_FLAGS_COMMON} clean && \
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/* && \
chmod +x /sbin/tini
EXPOSE 10050/TCP
@ -105,4 +108,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"]

View File

@ -11,6 +11,7 @@ ARG DB_TYPE=mysql
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive TERM=xterm \
MIBDIRS=/var/lib/mibs/iana:/var/lib/mibs/ietf:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
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}-ubuntu" \
org.label-schema.vendor="Zabbix LLC" \
@ -62,7 +63,8 @@ RUN locale-gen $LC_ALL && \
unixodbc && \
apt-get ${APT_FLAGS_COMMON} autoremove && \
apt-get ${APT_FLAGS_COMMON} clean && \
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/* && \
chmod +x /sbin/tini
ARG MAJOR_VERSION=3.2
ARG ZBX_VERSION=${MAJOR_VERSION}.11
@ -146,7 +148,8 @@ RUN apt-get ${APT_FLAGS_COMMON} update && \
unixodbc-dev && \
apt-get ${APT_FLAGS_COMMON} autoremove && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /root/.subversion
rm -rf /root/.subversion && \
chmod +x /sbin/tini
EXPOSE 10051/TCP
@ -157,4 +160,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"]

View File

@ -10,6 +10,7 @@ ARG APT_FLAGS_DEV="${APT_FLAGS_COMMON} --no-install-recommends"
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive TERM=xterm \
MIBDIRS=/var/lib/mibs/iana:/var/lib/mibs/ietf:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
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}-ubuntu" \
org.label-schema.vendor="Zabbix LLC" \
@ -140,7 +141,8 @@ RUN apt-get ${APT_FLAGS_COMMON} update && \
unixodbc-dev && \
apt-get ${APT_FLAGS_COMMON} autoremove && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /root/.subversion
rm -rf /root/.subversion && \
chmod +x /sbin/tini
EXPOSE 10051/TCP
@ -151,4 +153,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"]

View File

@ -10,6 +10,7 @@ ARG APT_FLAGS_DEV="${APT_FLAGS_COMMON} --no-install-recommends"
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive TERM=xterm \
MIBDIRS=/var/lib/mibs/iana:/var/lib/mibs/ietf:/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}-ubuntu" \
org.label-schema.vendor="Zabbix LLC" \
@ -153,7 +154,8 @@ RUN apt-get ${APT_FLAGS_COMMON} update && \
unixodbc-dev && \
apt-get ${APT_FLAGS_COMMON} autoremove && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /root/.subversion
rm -rf /root/.subversion && \
chmod +x /sbin/tini
EXPOSE 10051/TCP
@ -164,4 +166,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"]

View File

@ -10,6 +10,7 @@ ARG APT_FLAGS_DEV="${APT_FLAGS_COMMON} --no-install-recommends"
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive TERM=xterm \
MIBDIRS=/var/lib/mibs/iana:/var/lib/mibs/ietf:/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}-ubuntu" \
org.label-schema.vendor="Zabbix LLC" \
@ -152,7 +153,8 @@ RUN apt-get ${APT_FLAGS_COMMON} update && \
subversion \
unixodbc-dev && \
apt-get ${APT_FLAGS_COMMON} autoremove && \
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/* && \
chmod +x /sbin/tini
EXPOSE 10051/TCP
@ -163,4 +165,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"]

View File

@ -95,6 +95,7 @@ ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/var/lib/mibs/iana:/var/lib/mibs/ietf:/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}-ubuntu" \
org.label-schema.vendor="Zabbix LLC" \
@ -191,7 +192,8 @@ RUN locale-gen $LC_ALL && \
mkdir -p /var/lib/php5 && \
chown --quiet -R www-data:www-data /var/lib/php5 && \
rm -rf /var/cache/nginx/* && \
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/* && \
chmod +x /sbin/tini
EXPOSE 80/TCP 443/TCP 10051/TCP
@ -213,4 +215,6 @@ COPY ["docker-entrypoint.sh", "/usr/bin/"]
ENV ZBX_TYPE=appliance
ENTRYPOINT ["docker-entrypoint.sh"]
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["docker-entrypoint.sh"]