diff --git a/agent/alpine/Dockerfile b/agent/alpine/Dockerfile index fced1af93..873791bf8 100644 --- a/agent/alpine/Dockerfile +++ b/agent/alpine/Dockerfile @@ -9,7 +9,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ZBX_TYPE=agent -RUN apk update && \ +RUN set -eux && \ + apk update && \ apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ alpine-sdk \ autoconf \ @@ -74,7 +75,8 @@ 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_agentd.conf /etc/zabbix/zabbix_agentd.conf -RUN addgroup zabbix && \ +RUN set -eux && \ + addgroup zabbix && \ adduser -S \ -D -G zabbix \ -h /var/lib/zabbix/ \ @@ -86,7 +88,7 @@ RUN addgroup zabbix && \ mkdir -p /var/lib/zabbix/modules && \ chown --quiet -R zabbix:root /var/lib/zabbix && \ apk update && \ - apk add ${APK_FLAGS_PERSISTANT} \ + apk add ${APK_FLAGS_PERSISTENT} \ tini \ bash \ coreutils \ diff --git a/agent/centos/Dockerfile b/agent/centos/Dockerfile index 39ee666a9..0b82de6d9 100644 --- a/agent/centos/Dockerfile +++ b/agent/centos/Dockerfile @@ -9,7 +9,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ZBX_TYPE=agent -RUN yum --quiet makecache && \ +RUN set -eux && \ + yum --quiet makecache && \ yum ${YUM_FLAGS_DEV} install \ autoconf \ automake \ @@ -75,7 +76,8 @@ COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/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 && \ +RUN set -eux && \ + groupadd --system zabbix && \ adduser -r --shell /sbin/nologin \ -g zabbix \ -d /var/lib/zabbix/ \ diff --git a/agent/ubuntu/Dockerfile b/agent/ubuntu/Dockerfile index a11e43f67..09fd6b762 100644 --- a/agent/ubuntu/Dockerfile +++ b/agent/ubuntu/Dockerfile @@ -9,8 +9,9 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 TERM=xterm \ ZBX_TYPE=agent ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} -RUN apt-get ${APT_FLAGS_COMMON} update && \ - DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales && \ +RUN set -eux && \ + apt-get ${APT_FLAGS_COMMON} update && \ + DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_DEV} install locales && \ locale-gen $LC_ALL && \ DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_DEV} install \ autoconf \ @@ -81,7 +82,8 @@ COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/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 apt-get ${APT_FLAGS_COMMON} update && \ +RUN set -eux && \ + apt-get ${APT_FLAGS_COMMON} update && \ DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales && \ locale-gen $LC_ALL && \ echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ diff --git a/java-gateway/alpine/Dockerfile b/java-gateway/alpine/Dockerfile index 8e20590ec..796639c9f 100644 --- a/java-gateway/alpine/Dockerfile +++ b/java-gateway/alpine/Dockerfile @@ -21,7 +21,8 @@ LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-alpine" \ STOPSIGNAL SIGTERM -RUN addgroup zabbix && \ +RUN set -eux && \ + addgroup zabbix && \ adduser -S \ -D -G zabbix \ -h /var/lib/zabbix/ \ @@ -44,7 +45,8 @@ LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSI org.label-schema.vcs-url="${ZBX_SOURCES}" \ org.label-schema.docker.cmd="docker run --name zabbix-${ZBX_TYPE} --link zabbix-server:zabbix-server -p 10052:10052 -d zabbix-${ZBX_TYPE}:alpine-${ZBX_VERSION}" -RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ +RUN set -eux && \ + apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ autoconf \ automake \ coreutils \ diff --git a/java-gateway/centos/Dockerfile b/java-gateway/centos/Dockerfile index 48225d66c..0b8c4f69b 100644 --- a/java-gateway/centos/Dockerfile +++ b/java-gateway/centos/Dockerfile @@ -9,7 +9,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ZBX_TYPE=java-gateway -RUN yum --quiet makecache && \ +RUN set -eux && \ + yum ${YUM_FLAGS_COMMON} makecache && \ yum ${YUM_FLAGS_DEV} install \ autoconf \ automake \ @@ -67,7 +68,8 @@ STOPSIGNAL SIGTERM COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/bin/* /usr/sbin/zabbix_java/bin/ COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/lib/* /usr/sbin/zabbix_java/lib/ -RUN groupadd --system zabbix && \ +RUN set -eux && \ + groupadd --system zabbix && \ adduser --system --shell /sbin/nologin \ -g zabbix \ -d /var/lib/zabbix/ \ diff --git a/java-gateway/ubuntu/Dockerfile b/java-gateway/ubuntu/Dockerfile index 9d18884f9..b3b1afee6 100644 --- a/java-gateway/ubuntu/Dockerfile +++ b/java-gateway/ubuntu/Dockerfile @@ -21,7 +21,8 @@ LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-ubuntu" \ STOPSIGNAL SIGTERM -RUN apt-get ${APT_FLAGS_COMMON} update && \ +RUN set -eux && \ + apt-get ${APT_FLAGS_COMMON} update && \ DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales && \ locale-gen $LC_ALL && \ echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ @@ -51,7 +52,8 @@ LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSI org.label-schema.vcs-url="${ZBX_SOURCES}" \ org.label-schema.docker.cmd="docker run --name zabbix-${ZBX_TYPE} --link zabbix-server:zabbix-server -p 10052:10052 -d zabbix-${ZBX_TYPE}:ubuntu-${ZBX_VERSION}" -RUN apt-get ${APT_FLAGS_COMMON} update && \ +RUN set -eux && \ + apt-get ${APT_FLAGS_COMMON} update && \ DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_DEV} install \ autoconf \ automake \ diff --git a/proxy-mysql/alpine/Dockerfile b/proxy-mysql/alpine/Dockerfile index 75c164354..f4c1da81a 100644 --- a/proxy-mysql/alpine/Dockerfile +++ b/proxy-mysql/alpine/Dockerfile @@ -21,7 +21,8 @@ LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}-alpine" \ STOPSIGNAL SIGTERM -RUN addgroup zabbix && \ +RUN set -eux && \ + addgroup zabbix && \ adduser -S \ -D -G zabbix \ -h /var/lib/zabbix/ \ @@ -69,7 +70,8 @@ LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSI org.label-schema.vcs-url="${ZBX_SOURCES}" \ org.label-schema.docker.cmd="docker run --name zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE} --link mysql-server:mysql --link zabbix-server:zabbix-server -p 10051:10051 -d zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}:alpine-${ZBX_VERSION}" -RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ +RUN set -eux && \ + apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ autoconf \ automake \ coreutils \ @@ -124,8 +126,7 @@ RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \ apk del ${APK_FLAGS_COMMON} --purge \ build-dependencies && \ - rm -rf /var/cache/apk/* && \ - rm -rf /root/.subversion + rm -rf /var/cache/apk/* EXPOSE 10051/TCP diff --git a/proxy-mysql/centos/Dockerfile b/proxy-mysql/centos/Dockerfile index 642a65010..409b8df62 100644 --- a/proxy-mysql/centos/Dockerfile +++ b/proxy-mysql/centos/Dockerfile @@ -9,7 +9,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ZBX_TYPE=proxy ZBX_DB_TYPE=mysql -RUN yum --quiet makecache && \ +RUN set -eux && \ + yum --quiet makecache && \ yum ${YUM_FLAGS_DEV} install \ autoconf \ automake \ @@ -94,7 +95,8 @@ COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/conf/zabbix_${ZBX_TYPE}.conf /etc 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 && \ +RUN set -eux && \ + groupadd --system zabbix && \ adduser -r --shell /sbin/nologin \ -g zabbix \ -d /var/lib/zabbix/ \ @@ -114,7 +116,7 @@ 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/fping-3.10-1.el7.x86_64.rpm && \ + yum ${YUM_FLAGS_PERSISTENT} install https://repo.zabbix.com/non-supported/rhel/7/x86_64/fping-3.10-1.el7.x86_64.rpm && \ yum ${YUM_FLAGS_PERSISTENT} install \ libcurl \ libevent \ @@ -126,7 +128,7 @@ RUN groupadd --system zabbix && \ openssl-libs \ pcre \ unixODBC && \ - yum ${YUM_FLAGS_PERSISTANT} clean all && \ + yum ${YUM_FLAGS_PERSISTENT} clean all && \ rm -rf /var/cache/yum/ && \ chmod +x /sbin/tini diff --git a/proxy-mysql/ubuntu/Dockerfile b/proxy-mysql/ubuntu/Dockerfile index ae1bd4922..0f12343d0 100644 --- a/proxy-mysql/ubuntu/Dockerfile +++ b/proxy-mysql/ubuntu/Dockerfile @@ -24,7 +24,8 @@ LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}-ubuntu" \ STOPSIGNAL SIGTERM -RUN apt-get ${APT_FLAGS_COMMON} update && \ +RUN set -eux && \ + apt-get ${APT_FLAGS_COMMON} update && \ DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales && \ locale-gen $LC_ALL && \ echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ @@ -80,7 +81,8 @@ LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSI ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /sbin/tini -RUN apt-get ${APT_FLAGS_COMMON} update && \ +RUN set -eux && \ + apt-get ${APT_FLAGS_COMMON} update && \ DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_DEV} install \ autoconf \ automake \ diff --git a/proxy-sqlite3/alpine/Dockerfile b/proxy-sqlite3/alpine/Dockerfile index b2954bac4..e10739584 100644 --- a/proxy-sqlite3/alpine/Dockerfile +++ b/proxy-sqlite3/alpine/Dockerfile @@ -21,7 +21,8 @@ LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}-alpine" \ STOPSIGNAL SIGTERM -RUN addgroup zabbix && \ +RUN set -eux && \ + addgroup zabbix && \ adduser -S \ -D -G zabbix \ -h /var/lib/zabbix/ \ @@ -67,7 +68,8 @@ LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSI org.label-schema.vcs-url="${ZBX_SOURCES}" \ org.label-schema.docker.cmd="docker run --name zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE} --link zabbix-server:zabbix-server -p 10051:10051 -d zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}:alpine-${ZBX_VERSION}" -RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ +RUN set -eux && \ + apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ alpine-sdk \ autoconf \ automake \ diff --git a/proxy-sqlite3/centos/Dockerfile b/proxy-sqlite3/centos/Dockerfile index db96b1210..62f54bc8b 100644 --- a/proxy-sqlite3/centos/Dockerfile +++ b/proxy-sqlite3/centos/Dockerfile @@ -9,7 +9,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ZBX_TYPE=proxy ZBX_DB_TYPE=sqlite3 -RUN yum --quiet makecache && \ +RUN set -eux && \ + yum --quiet makecache && \ yum ${YUM_FLAGS_DEV} install \ autoconf \ automake \ @@ -94,7 +95,8 @@ COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/conf/zabbix_${ZBX_TYPE}.conf /etc 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 && \ +RUN set -eux && \ + groupadd --system zabbix && \ adduser -r --shell /sbin/nologin \ -g zabbix \ -d /var/lib/zabbix/ \ @@ -114,7 +116,7 @@ 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/fping-3.10-1.el7.x86_64.rpm && \ + yum ${YUM_FLAGS_PERSISTENT} install https://repo.zabbix.com/non-supported/rhel/7/x86_64/fping-3.10-1.el7.x86_64.rpm && \ yum ${YUM_FLAGS_PERSISTENT} install \ libcurl \ libevent \ diff --git a/proxy-sqlite3/ubuntu/Dockerfile b/proxy-sqlite3/ubuntu/Dockerfile index 030c23fb4..19c367dfa 100644 --- a/proxy-sqlite3/ubuntu/Dockerfile +++ b/proxy-sqlite3/ubuntu/Dockerfile @@ -23,7 +23,8 @@ LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}-ubuntu" \ STOPSIGNAL SIGTERM -RUN apt-get ${APT_FLAGS_COMMON} update && \ +RUN set -eux && \ + apt-get ${APT_FLAGS_COMMON} update && \ DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales && \ locale-gen $LC_ALL && \ echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ @@ -77,7 +78,8 @@ LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSI ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /sbin/tini -RUN apt-get ${APT_FLAGS_COMMON} update && \ +RUN set -eux && \ + apt-get ${APT_FLAGS_COMMON} update && \ DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_DEV} install \ autoconf \ automake \ diff --git a/server-mysql/alpine/Dockerfile b/server-mysql/alpine/Dockerfile index 674b4aefd..8573d34f0 100644 --- a/server-mysql/alpine/Dockerfile +++ b/server-mysql/alpine/Dockerfile @@ -21,7 +21,8 @@ LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}-alpine" \ STOPSIGNAL SIGTERM -RUN addgroup zabbix && \ +RUN set -eux && \ + addgroup zabbix && \ adduser -S \ -D -G zabbix \ -h /var/lib/zabbix/ \ @@ -71,7 +72,8 @@ LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSI org.label-schema.vcs-url="${ZBX_SOURCES}" \ org.label-schema.docker.cmd="docker run --name zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE} --link mysql-server:mysql -p 10051:10051 -d zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}:alpine-${ZBX_VERSION}" -RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ +RUN set -eux && \ + apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ alpine-sdk \ autoconf \ automake \ diff --git a/server-mysql/centos/Dockerfile b/server-mysql/centos/Dockerfile index 4fb0246c8..44ec849e4 100644 --- a/server-mysql/centos/Dockerfile +++ b/server-mysql/centos/Dockerfile @@ -9,9 +9,10 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git 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 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 && \ +RUN set -eux && \ + yum --quiet makecache && \ + yum ${YUM_FLAGS_DEV} install https://repo.zabbix.com/non-supported/rhel/7/x86_64/iksemel-devel-1.4-2.el7.centos.x86_64.rpm \ + https://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 \ @@ -99,7 +100,8 @@ COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/conf/zabbix_${ZBX_TYPE}.conf /etc 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 && \ +RUN set -eux && \ + groupadd --system zabbix && \ adduser -r --shell /sbin/nologin \ -g zabbix -G dialout \ -d /var/lib/zabbix/ \ @@ -120,8 +122,8 @@ 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 https://repo.zabbix.com/non-supported/rhel/7/x86_64/iksemel-1.4-2.el7.centos.x86_64.rpm \ + https://repo.zabbix.com/non-supported/rhel/7/x86_64/fping-3.10-1.el7.x86_64.rpm && \ yum ${YUM_FLAGS_PERSISTENT} install \ iputils \ traceroute \ diff --git a/server-mysql/ubuntu/Dockerfile b/server-mysql/ubuntu/Dockerfile index 541fc8e2b..9e19f4453 100644 --- a/server-mysql/ubuntu/Dockerfile +++ b/server-mysql/ubuntu/Dockerfile @@ -23,7 +23,8 @@ LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}-ubuntu" \ STOPSIGNAL SIGTERM -RUN apt-get ${APT_FLAGS_COMMON} update && \ +RUN set -eux && \ + apt-get ${APT_FLAGS_COMMON} update && \ DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales && \ locale-gen $LC_ALL && \ echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ @@ -84,7 +85,8 @@ LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSI ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /sbin/tini -RUN apt-get ${APT_FLAGS_COMMON} update && \ +RUN set -eux && \ + apt-get ${APT_FLAGS_COMMON} update && \ DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_DEV} install \ autoconf \ automake \ diff --git a/server-pgsql/alpine/Dockerfile b/server-pgsql/alpine/Dockerfile index 59e625308..17449d21a 100644 --- a/server-pgsql/alpine/Dockerfile +++ b/server-pgsql/alpine/Dockerfile @@ -21,7 +21,8 @@ LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}-alpine" \ STOPSIGNAL SIGTERM -RUN addgroup zabbix && \ +RUN set -eux && \ + addgroup zabbix && \ adduser -S \ -D -G zabbix \ -h /var/lib/zabbix/ \ @@ -71,7 +72,8 @@ LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSI org.label-schema.vcs-url="${ZBX_SOURCES}" \ org.label-schema.docker.cmd="docker run --name zabbix-${ZBX_TYPE}-pgsql --link postgres-server:postgres -p 10051:10051 -d zabbix-${ZBX_TYPE}-pgsql:alpine-${ZBX_VERSION}" -RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ +RUN set -eux && \ + apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ alpine-sdk \ autoconf \ automake \ diff --git a/server-pgsql/centos/Dockerfile b/server-pgsql/centos/Dockerfile index 1c4f77e9d..391dcea1e 100644 --- a/server-pgsql/centos/Dockerfile +++ b/server-pgsql/centos/Dockerfile @@ -9,9 +9,10 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git 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 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 && \ +RUN set -eux && \ + yum --quiet makecache && \ + yum ${YUM_FLAGS_DEV} install https://repo.zabbix.com/non-supported/rhel/7/x86_64/iksemel-devel-1.4-2.el7.centos.x86_64.rpm \ + https://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 \ @@ -100,7 +101,8 @@ COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/database/${ZBX_DB_TYPE}/create.sq COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/database/${ZBX_DB_TYPE}/timescaledb.sql /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}/timescaledb.sql ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /sbin/tini -RUN groupadd --system zabbix && \ +RUN set -eux && \ + groupadd --system zabbix && \ adduser -r --shell /sbin/nologin \ -g zabbix -G dialout \ -d /var/lib/zabbix/ \ @@ -121,8 +123,8 @@ 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 https://repo.zabbix.com/non-supported/rhel/7/x86_64/iksemel-1.4-2.el7.centos.x86_64.rpm \ + https://repo.zabbix.com/non-supported/rhel/7/x86_64/fping-3.10-1.el7.x86_64.rpm && \ yum ${YUM_FLAGS_PERSISTENT} install \ iputils \ traceroute \ diff --git a/server-pgsql/ubuntu/Dockerfile b/server-pgsql/ubuntu/Dockerfile index 3d9bdc523..43e030927 100644 --- a/server-pgsql/ubuntu/Dockerfile +++ b/server-pgsql/ubuntu/Dockerfile @@ -23,7 +23,8 @@ LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}-ubuntu" \ STOPSIGNAL SIGTERM -RUN apt-get ${APT_FLAGS_COMMON} update && \ +RUN set -eux && \ + apt-get ${APT_FLAGS_COMMON} update && \ DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales && \ locale-gen $LC_ALL && \ echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ @@ -84,7 +85,8 @@ LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSI ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /sbin/tini -RUN apt-get ${APT_FLAGS_COMMON} update && \ +RUN set -eux && \ + apt-get ${APT_FLAGS_COMMON} update && \ DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_DEV} install \ autoconf \ automake \ diff --git a/snmptraps/alpine/Dockerfile b/snmptraps/alpine/Dockerfile index 22f644436..6865e0b10 100644 --- a/snmptraps/alpine/Dockerfile +++ b/snmptraps/alpine/Dockerfile @@ -32,7 +32,8 @@ STOPSIGNAL SIGTERM COPY ["snmptrapfmt_1.14+nmu1ubuntu2.tar.gz", "/tmp/"] -RUN addgroup zabbix && \ +RUN set -eux && \ + addgroup zabbix && \ adduser -S \ -D -G zabbix \ -h /var/lib/zabbix/ \ diff --git a/snmptraps/centos/Dockerfile b/snmptraps/centos/Dockerfile index 0090f1b18..cd3c4084a 100644 --- a/snmptraps/centos/Dockerfile +++ b/snmptraps/centos/Dockerfile @@ -10,7 +10,8 @@ ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} COPY ["snmptrapfmt_1.14+nmu1ubuntu2.tar.gz", "/tmp/"] -RUN yum ${YUM_FLAGS_COMMON} makecache && \ +RUN set -eux && \ + yum ${YUM_FLAGS_COMMON} makecache && \ yum ${YUM_FLAGS_DEV} install \ autoconf \ automake \ @@ -59,7 +60,8 @@ COPY --from=builder /tmp/snmptrapfmt-1.14+nmu1ubuntu1/snmptrapfmthdlr /usr/sbin/ COPY --from=builder /tmp/snmptrapfmt-1.14+nmu1ubuntu1/snmptrapfmt /usr/sbin/snmptrapfmt COPY --from=builder /tmp/snmptrapfmt-1.14+nmu1ubuntu1/snmptrapfmt.conf /etc/snmp/snmptrapfmt.conf -RUN groupadd --system zabbix && \ +RUN set -eux && \ + groupadd --system zabbix && \ adduser -r --shell /sbin/nologin \ -g zabbix \ -d /var/lib/zabbix/ \ diff --git a/snmptraps/ubuntu/Dockerfile b/snmptraps/ubuntu/Dockerfile index e501a658e..d94aebd8f 100644 --- a/snmptraps/ubuntu/Dockerfile +++ b/snmptraps/ubuntu/Dockerfile @@ -33,7 +33,8 @@ STOPSIGNAL SIGTERM COPY ["snmptrapfmt_1.14+nmu1ubuntu2_amd64.deb", "/tmp/"] -RUN apt-get ${APT_FLAGS_COMMON} update && \ +RUN set -eux && \ + apt-get ${APT_FLAGS_COMMON} update && \ DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales && \ locale-gen $LC_ALL && \ echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ diff --git a/web-apache-mysql/alpine/Dockerfile b/web-apache-mysql/alpine/Dockerfile index 24fe9667d..c661f8857 100644 --- a/web-apache-mysql/alpine/Dockerfile +++ b/web-apache-mysql/alpine/Dockerfile @@ -21,7 +21,8 @@ LABEL org.label-schema.name="zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}-alpine" \ STOPSIGNAL SIGTERM -RUN addgroup zabbix && \ +RUN set -eux && \ + addgroup zabbix && \ adduser -S \ -D -G zabbix \ -h /var/lib/zabbix/ \ @@ -64,7 +65,8 @@ LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSI org.label-schema.vcs-url="${ZBX_SOURCES}" \ org.label-schema.docker.cmd="docker run --name zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE} --link mysql-server:mysql --link zabbix-server:zabbix-server -p 80:80 -d zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}:alpine-${ZBX_VERSION}" -RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ +RUN set -eux && \ + apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ gettext \ git && \ cd /usr/share/ && \ diff --git a/web-apache-mysql/centos/Dockerfile b/web-apache-mysql/centos/Dockerfile index 5fd615429..6d0b8194e 100644 --- a/web-apache-mysql/centos/Dockerfile +++ b/web-apache-mysql/centos/Dockerfile @@ -8,7 +8,8 @@ ARG ZBX_VERSION=${MAJOR_VERSION}.1 ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} -RUN yum --quiet makecache && \ +RUN set -eux && \ + yum --quiet makecache && \ yum ${YUM_FLAGS_DEV} install \ gettext \ git && \ @@ -54,7 +55,8 @@ STOPSIGNAL SIGTERM COPY --from=builder /tmp/zabbix/ /usr/share/zabbix/ -RUN groupadd --system zabbix && \ +RUN set -eux && \ + groupadd --system zabbix && \ adduser -r --shell /sbin/nologin \ -g zabbix \ -d /var/lib/zabbix/ \ @@ -80,7 +82,7 @@ RUN groupadd --system zabbix && \ cut -d"'" -f 2 | sort | \ xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ chown --quiet -R apache:apache /usr/share/zabbix && \ - yum ${YUM_FLAGS_PERSISTANT} clean all && \ + yum ${YUM_FLAGS_PERSISTENT} clean all && \ rm -rf /var/cache/yum/ EXPOSE 80/TCP 443/TCP diff --git a/web-apache-mysql/ubuntu/Dockerfile b/web-apache-mysql/ubuntu/Dockerfile index 40c785eae..57b31af5e 100644 --- a/web-apache-mysql/ubuntu/Dockerfile +++ b/web-apache-mysql/ubuntu/Dockerfile @@ -21,7 +21,8 @@ LABEL org.label-schema.name="zabbix-web-${ZBX_OPT_TYPE}-${DB_TYPE}-ubuntu" \ STOPSIGNAL SIGTERM -RUN apt-get ${APT_FLAGS_COMMON} update && \ +RUN set -eux && \ + apt-get ${APT_FLAGS_COMMON} update && \ DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales && \ locale-gen $LC_ALL && \ echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ @@ -62,7 +63,8 @@ LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSI org.label-schema.vcs-url="${ZBX_SOURCES}" \ org.label-schema.docker.cmd="docker run --name zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE} --link mysql-server:mysql --link zabbix-server:zabbix-server -p 80:80 -d zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}:ubuntu-${ZBX_VERSION}" -RUN apt-get ${APT_FLAGS_COMMON} update && \ +RUN set -eux && \ + apt-get ${APT_FLAGS_COMMON} update && \ DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_DEV} install \ gettext \ ca-certificates \ diff --git a/web-apache-pgsql/alpine/Dockerfile b/web-apache-pgsql/alpine/Dockerfile index 62f68c612..9a82d0862 100644 --- a/web-apache-pgsql/alpine/Dockerfile +++ b/web-apache-pgsql/alpine/Dockerfile @@ -21,7 +21,8 @@ LABEL org.label-schema.name="zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}-alpine" \ STOPSIGNAL SIGTERM -RUN addgroup zabbix && \ +RUN set -eux && \ + addgroup zabbix && \ adduser -S \ -D -G zabbix \ -h /var/lib/zabbix/ \ @@ -63,7 +64,8 @@ LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSI org.label-schema.vcs-url="${ZBX_SOURCES}" \ org.label-schema.docker.cmd="docker run --name zabbix-web-${ZBX_OPT_TYPE}-pgsql --link postgres-server:postgres --link zabbix-server:zabbix-server -p 80:80 -d zabbix-web-${ZBX_OPT_TYPE}-pgsql:alpine-${ZBX_VERSION}" -RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ +RUN set -eux && \ + apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ gettext \ git && \ cd /usr/share/ && \ diff --git a/web-apache-pgsql/centos/Dockerfile b/web-apache-pgsql/centos/Dockerfile index 6bc8a7b05..a4a9edf62 100644 --- a/web-apache-pgsql/centos/Dockerfile +++ b/web-apache-pgsql/centos/Dockerfile @@ -8,7 +8,8 @@ ARG ZBX_VERSION=${MAJOR_VERSION}.1 ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} -RUN yum --quiet makecache && \ +RUN set -eux && \ + yum --quiet makecache && \ yum ${YUM_FLAGS_DEV} install \ gettext \ patch \ @@ -55,7 +56,8 @@ STOPSIGNAL SIGTERM COPY --from=builder /tmp/zabbix/ /usr/share/zabbix/ -RUN groupadd --system zabbix && \ +RUN set -eux && \ + groupadd --system zabbix && \ adduser -r --shell /sbin/nologin \ -g zabbix \ -d /var/lib/zabbix/ \ diff --git a/web-apache-pgsql/ubuntu/Dockerfile b/web-apache-pgsql/ubuntu/Dockerfile index bd06a91f1..4a40495fb 100644 --- a/web-apache-pgsql/ubuntu/Dockerfile +++ b/web-apache-pgsql/ubuntu/Dockerfile @@ -21,7 +21,8 @@ LABEL org.label-schema.name="zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}-ubuntu" \ STOPSIGNAL SIGTERM -RUN apt-get ${APT_FLAGS_COMMON} update && \ +RUN set -eux && \ + apt-get ${APT_FLAGS_COMMON} update && \ DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales && \ locale-gen $LC_ALL && \ echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ @@ -63,9 +64,8 @@ LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSI org.label-schema.vcs-url="${ZBX_SOURCES}" \ org.label-schema.docker.cmd="docker run --name zabbix-web-${ZBX_OPT_TYPE}-pgsql --link postgres-server:postgres --link zabbix-server:zabbix-server -p 80:80 -d zabbix-web-${ZBX_OPT_TYPE}-pgsql:ubuntu-${ZBX_VERSION}" -COPY ["conf/tmp/font-config", "/tmp/font-config"] - -RUN apt-get ${APT_FLAGS_COMMON} update && \ +RUN set -eux && \ + apt-get ${APT_FLAGS_COMMON} update && \ DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_DEV} install \ gettext \ patch \ @@ -77,14 +77,9 @@ RUN apt-get ${APT_FLAGS_COMMON} update && \ cp -R /usr/share/zabbix-${ZBX_VERSION}/frontends/php/* /usr/share/zabbix/ && \ rm -rf /usr/share/zabbix-${ZBX_VERSION}/ && \ cd /usr/share/zabbix/ && \ - patch -p3 < /tmp/font-config && \ - rm /tmp/font-config && \ rm -f conf/zabbix.conf.php && \ rm -rf tests && \ - rm /usr/share/zabbix/fonts/DejaVuSans.ttf && \ ./locale/make_mo.sh && \ - update-alternatives --install /usr/share/zabbix/fonts/graphfont.ttf \ - zabbix-frontend-font /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf 10 && \ mkdir -p /var/lib/locales/supported.d/ && \ rm -f /var/lib/locales/supported.d/local && \ cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ diff --git a/web-nginx-mysql/alpine/Dockerfile b/web-nginx-mysql/alpine/Dockerfile index bdef1ec06..665af9469 100644 --- a/web-nginx-mysql/alpine/Dockerfile +++ b/web-nginx-mysql/alpine/Dockerfile @@ -21,7 +21,8 @@ LABEL org.label-schema.name="zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}-alpine" \ STOPSIGNAL SIGTERM -RUN addgroup zabbix && \ +RUN set -eux && \ + addgroup zabbix && \ adduser -S \ -D -G zabbix \ -h /var/lib/zabbix/ \ @@ -64,7 +65,8 @@ LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSI org.label-schema.vcs-url="${ZBX_SOURCES}" \ org.label-schema.docker.cmd="docker run --name zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE} --link mysql-server:mysql --link zabbix-server:zabbix-server -p 80:80 -d zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}:alpine-${ZBX_VERSION}" -RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ +RUN set -eux && \ + apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ coreutils \ gettext \ git && \ diff --git a/web-nginx-mysql/centos/Dockerfile b/web-nginx-mysql/centos/Dockerfile index 52e2c3f62..febf8d1fd 100644 --- a/web-nginx-mysql/centos/Dockerfile +++ b/web-nginx-mysql/centos/Dockerfile @@ -9,7 +9,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ZBX_TYPE=frontend ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=nginx -RUN yum --quiet makecache && \ +RUN set -eux && \ + yum --quiet makecache && \ yum ${YUM_FLAGS_DEV} install \ gettext \ patch \ @@ -56,7 +57,8 @@ STOPSIGNAL SIGTERM COPY --from=builder /tmp/zabbix/ /usr/share/zabbix/ -RUN groupadd --system zabbix && \ +RUN set -eux && \ + groupadd --system zabbix && \ adduser -r --shell /sbin/nologin \ -g zabbix \ -d /var/lib/zabbix/ \ diff --git a/web-nginx-mysql/ubuntu/Dockerfile b/web-nginx-mysql/ubuntu/Dockerfile index 829594647..2b645eefe 100644 --- a/web-nginx-mysql/ubuntu/Dockerfile +++ b/web-nginx-mysql/ubuntu/Dockerfile @@ -21,8 +21,9 @@ LABEL org.label-schema.name="zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}-ubuntu" \ STOPSIGNAL SIGTERM -RUN apt-get ${APT_FLAGS_COMMON} update && \ - DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales gnupg2 && \ +RUN set -eux && \ + apt-get ${APT_FLAGS_COMMON} update && \ + DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales gnupg2 ca-certificates && \ locale-gen $LC_ALL && \ echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ addgroup --system --quiet zabbix && \ @@ -49,7 +50,7 @@ RUN apt-get ${APT_FLAGS_COMMON} update && \ done; \ test -z "$found" && echo >&2 "error: failed to fetch GPG key $NGINX_GPGKEY" && exit 1; \ DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \ - echo "deb http://nginx.org/packages/ubuntu/ $DISTRIB_CODENAME nginx" >> /etc/apt/sources.list.d/nginx.list && \ + echo "deb https://nginx.org/packages/ubuntu/ $DISTRIB_CODENAME nginx" >> /etc/apt/sources.list.d/nginx.list && \ apt-get ${APT_FLAGS_COMMON} update && \ DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install \ curl \ @@ -83,10 +84,10 @@ LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSI org.label-schema.vcs-url="${ZBX_SOURCES}" \ org.label-schema.docker.cmd="docker run --name zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE} --link mysql-server:mysql --link zabbix-server:zabbix-server -p 80:80 -d zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}:ubuntu-${ZBX_VERSION}" -RUN apt-get ${APT_FLAGS_COMMON} update && \ +RUN set -eux && \ + apt-get ${APT_FLAGS_COMMON} update && \ DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_DEV} install \ gettext \ - ca-certificates \ git && \ cd /usr/share/ && \ git clone ${ZBX_SOURCES} --branch ${ZBX_VERSION} --depth 1 --single-branch zabbix-${ZBX_VERSION} && \ diff --git a/web-nginx-pgsql/alpine/Dockerfile b/web-nginx-pgsql/alpine/Dockerfile index 17b977fde..64269e247 100644 --- a/web-nginx-pgsql/alpine/Dockerfile +++ b/web-nginx-pgsql/alpine/Dockerfile @@ -21,7 +21,8 @@ LABEL org.label-schema.name="zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}-alpine" \ STOPSIGNAL SIGTERM -RUN addgroup zabbix && \ +RUN set -eux && \ + addgroup zabbix && \ adduser -S \ -D -G zabbix \ -h /var/lib/zabbix/ \ @@ -63,7 +64,8 @@ LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSI org.label-schema.vcs-url="${ZBX_SOURCES}" \ org.label-schema.docker.cmd="docker run --name zabbix-web-${ZBX_OPT_TYPE}-pgsql --link postgres-server:postgres --link zabbix-server:zabbix-server -p 80:80 -d zabbix-web-${ZBX_OPT_TYPE}-pgsql:alpine-${ZBX_VERSION}" -RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ +RUN set -eux && \ + apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ coreutils \ gettext \ git && \ diff --git a/web-nginx-pgsql/centos/Dockerfile b/web-nginx-pgsql/centos/Dockerfile index a8e86fc35..2efd1741f 100644 --- a/web-nginx-pgsql/centos/Dockerfile +++ b/web-nginx-pgsql/centos/Dockerfile @@ -9,7 +9,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ZBX_TYPE=frontend ZBX_DB_TYPE=postgresql ZBX_OPT_TYPE=nginx -RUN yum --quiet makecache && \ +RUN set -eux && \ + yum --quiet makecache && \ yum ${YUM_FLAGS_DEV} install \ gettext \ git && \ @@ -55,7 +56,8 @@ STOPSIGNAL SIGTERM COPY --from=builder /tmp/zabbix/ /usr/share/zabbix/ -RUN groupadd --system zabbix && \ +RUN set -eux && \ + groupadd --system zabbix && \ adduser -r --shell /sbin/nologin \ -g zabbix \ -d /var/lib/zabbix/ \ diff --git a/web-nginx-pgsql/ubuntu/Dockerfile b/web-nginx-pgsql/ubuntu/Dockerfile index 9e60a3965..8e98df46b 100644 --- a/web-nginx-pgsql/ubuntu/Dockerfile +++ b/web-nginx-pgsql/ubuntu/Dockerfile @@ -21,8 +21,9 @@ LABEL org.label-schema.name="zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}-ubuntu" \ STOPSIGNAL SIGTERM -RUN apt-get ${APT_FLAGS_COMMON} update && \ - DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales gnupg2 && \ +RUN set -eux && \ + apt-get ${APT_FLAGS_COMMON} update && \ + DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales gnupg2 ca-certificates && \ locale-gen $LC_ALL && \ echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ addgroup --system --quiet zabbix && \ @@ -49,7 +50,7 @@ RUN apt-get ${APT_FLAGS_COMMON} update && \ done; \ test -z "$found" && echo >&2 "error: failed to fetch GPG key $NGINX_GPGKEY" && exit 1; \ DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \ - echo "deb http://nginx.org/packages/ubuntu/ $DISTRIB_CODENAME nginx" >> /etc/apt/sources.list.d/nginx.list && \ + echo "deb https://nginx.org/packages/ubuntu/ $DISTRIB_CODENAME nginx" >> /etc/apt/sources.list.d/nginx.list && \ apt-get ${APT_FLAGS_COMMON} update && \ DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install \ curl \ @@ -83,10 +84,10 @@ LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSI org.label-schema.vcs-url="${ZBX_SOURCES}" \ org.label-schema.docker.cmd="docker run --name zabbix-web-${ZBX_OPT_TYPE}-pgsql --link postgres-server:postgres --link zabbix-server:zabbix-server -p 80:80 -d zabbix-web-${ZBX_OPT_TYPE}-pgsql:ubuntu-${ZBX_VERSION}" -RUN apt-get ${APT_FLAGS_COMMON} update && \ +RUN set -eux && \ + apt-get ${APT_FLAGS_COMMON} update && \ DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_DEV} install \ gettext \ - ca-certificates \ git && \ cd /usr/share/ && \ git clone ${ZBX_SOURCES} --branch ${ZBX_VERSION} --depth 1 --single-branch zabbix-${ZBX_VERSION} && \ diff --git a/zabbix-appliance/alpine/Dockerfile b/zabbix-appliance/alpine/Dockerfile index 69916fdf6..8e7c3c9c1 100644 --- a/zabbix-appliance/alpine/Dockerfile +++ b/zabbix-appliance/alpine/Dockerfile @@ -11,7 +11,8 @@ ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ 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 -RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ +RUN set -eux && \ + apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ bash \ alpine-sdk \ autoconf \ @@ -115,7 +116,8 @@ COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/lib/ /usr/sbin/za COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/frontends/php/ /usr/share/zabbix/ -RUN addgroup zabbix && \ +RUN set -eux && \ + addgroup zabbix && \ adduser -S \ -D -G zabbix \ -h /var/lib/zabbix/ \ diff --git a/zabbix-appliance/centos/Dockerfile b/zabbix-appliance/centos/Dockerfile index cf2e5dd18..74c198548 100644 --- a/zabbix-appliance/centos/Dockerfile +++ b/zabbix-appliance/centos/Dockerfile @@ -10,8 +10,9 @@ ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ 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 -RUN 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 && \ +RUN set -eux && \ + yum ${YUM_FLAGS_DEV} install https://repo.zabbix.com/non-supported/rhel/7/x86_64/iksemel-devel-1.4-2.el7.centos.x86_64.rpm \ + https://repo.zabbix.com/non-supported/rhel/7/x86_64/iksemel-1.4-2.el7.centos.x86_64.rpm && \ yum --quiet makecache && \ yum ${YUM_FLAGS_DEV} install \ autoconf \ @@ -116,7 +117,8 @@ COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/lib/ /usr/sbin/za 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 && \ +RUN set -eux && \ + groupadd --system zabbix && \ adduser -r --shell /sbin/nologin \ -g zabbix -G dialout \ -d /var/lib/zabbix/ \ @@ -137,8 +139,8 @@ 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 https://repo.zabbix.com/non-supported/rhel/7/x86_64/iksemel-1.4-2.el7.centos.x86_64.rpm \ + https://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 \ iputils \ diff --git a/zabbix-appliance/rhel/Dockerfile b/zabbix-appliance/rhel/Dockerfile index 09ed966ef..47bbdf0a7 100644 --- a/zabbix-appliance/rhel/Dockerfile +++ b/zabbix-appliance/rhel/Dockerfile @@ -76,7 +76,7 @@ RUN INSTALL_PKGS="OpenIPMI-libs \ php-mysql \ php-xml \ unixODBC" && \ - rpm -ivh http://repo.zabbix.com/zabbix/${MAJOR_VERSION}/rhel/7/x86_64/zabbix-release-${MAJOR_VERSION}-2.el7.noarch.rpm && \ + rpm -ivh https://repo.zabbix.com/zabbix/${MAJOR_VERSION}/rhel/7/x86_64/zabbix-release-${MAJOR_VERSION}-2.el7.noarch.rpm && \ REPOLIST="rhel-7-server-rpms,rhel-7-server-optional-rpms,zabbix-non-supported,nginx" && \ yum -y update-minimal --disablerepo "*" --enablerepo rhel-7-server-rpms --setopt=tsflags=nodocs \ --security --sec-severity=Important --sec-severity=Critical && \ diff --git a/zabbix-appliance/ubuntu/Dockerfile b/zabbix-appliance/ubuntu/Dockerfile index 9b59713d8..48125f374 100644 --- a/zabbix-appliance/ubuntu/Dockerfile +++ b/zabbix-appliance/ubuntu/Dockerfile @@ -12,7 +12,8 @@ ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ 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 -RUN apt-get ${APT_FLAGS_COMMON} update && \ +RUN set -eux && \ + apt-get ${APT_FLAGS_COMMON} update && \ DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_DEV} install locales && \ locale-gen $LC_ALL && \ apt-get ${APT_FLAGS_COMMON} update && \ @@ -90,7 +91,7 @@ ARG MAJOR_VERSION=4.2 ARG ZBX_VERSION=${MAJOR_VERSION}.1 ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ - LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8TERM=xterm \ + LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 TERM=xterm \ MIBDIRS=/var/lib/snmp/mibs/ietf:/var/lib/snmp/mibs/iana:/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 @@ -123,8 +124,9 @@ COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/lib/ /usr/sbin/za 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 apt-get ${APT_FLAGS_COMMON} update && \ - DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales gnupg2 && \ +RUN set -eux && \ + apt-get ${APT_FLAGS_COMMON} update && \ + DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales gnupg2 ca-certificates && \ locale-gen $LC_ALL && \ echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ addgroup --system --quiet zabbix && \ @@ -163,7 +165,7 @@ RUN apt-get ${APT_FLAGS_COMMON} update && \ done; \ test -z "$found" && echo >&2 "error: failed to fetch GPG key $NGINX_GPGKEY" && exit 1; \ DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \ - echo "deb http://nginx.org/packages/ubuntu/ $DISTRIB_CODENAME nginx" >> /etc/apt/sources.list.d/nginx.list && \ + echo "deb https://nginx.org/packages/ubuntu/ $DISTRIB_CODENAME nginx" >> /etc/apt/sources.list.d/nginx.list && \ apt-get ${APT_FLAGS_COMMON} update && \ DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install \ iputils-ping \ @@ -194,7 +196,6 @@ RUN apt-get ${APT_FLAGS_COMMON} update && \ php7.2-xml \ snmp-mibs-downloader \ supervisor \ - ca-certificates \ unixodbc && \ mkdir -p /var/lib/locales/supported.d/ && \ rm -f /var/lib/locales/supported.d/local && \