diff --git a/agent/alpine/Dockerfile b/agent/alpine/Dockerfile index aa5972c03..e522fbb36 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 \ @@ -73,7 +74,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/ \ @@ -85,7 +87,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 e26f57386..2a656ec84 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 a7d137cce..47886f104 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 \ @@ -80,7 +81,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 7868ba562..11e576488 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 98334cb2b..4e565aaed 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 5eeb06806..9352084e7 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 a8f9cfdba..739652eac 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/ \ @@ -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 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 \ @@ -120,8 +122,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 40ac0bb6f..b3dcc6fee 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 \ @@ -93,7 +94,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/ \ @@ -113,7 +115,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 \ libxml2 \ @@ -124,7 +126,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 ef89aef5c..4acea13e2 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 && \ @@ -78,7 +79,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 3c65e74c5..aab1d0b52 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/ \ @@ -65,7 +66,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 2f6e8b091..6b7288bab 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 \ @@ -93,7 +94,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/ \ @@ -113,7 +115,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 \ libxml2 \ diff --git a/proxy-sqlite3/ubuntu/Dockerfile b/proxy-sqlite3/ubuntu/Dockerfile index 2149e1338..926178e64 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 && \ @@ -75,7 +76,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 f0d70e89f..809f3b83c 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/ \ @@ -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 -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 3610bc007..5f71ae6dd 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 \ @@ -98,7 +99,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/ \ @@ -119,8 +121,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 6be40053e..8b37058ff 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 && \ @@ -82,7 +83,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 1f167fc2e..73f9b4c63 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/ \ @@ -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}-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 4d78d80d0..3e8c275e4 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 \ @@ -98,7 +99,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/ \ @@ -119,8 +121,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 0db520993..68ebe5cdd 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 && \ @@ -82,7 +83,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 c0e958880..abfc36dfd 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 86954ad87..95af73672 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 3ee880641..feef9ba59 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 c722a956b..bc1db87cc 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 714765517..6f573b1a3 100644 --- a/web-apache-mysql/centos/Dockerfile +++ b/web-apache-mysql/centos/Dockerfile @@ -8,7 +8,8 @@ ARG ZBX_VERSION=${MAJOR_VERSION} 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/ \ @@ -79,7 +81,7 @@ RUN groupadd --system zabbix && \ cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ cut -d"'" -f 2 | sort | \ xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ - 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 2fadb7fa2..1f0c4796d 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 fd7e2cf57..78b4079c0 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 312fe4b79..a24c87360 100644 --- a/web-apache-pgsql/centos/Dockerfile +++ b/web-apache-pgsql/centos/Dockerfile @@ -8,7 +8,8 @@ ARG ZBX_VERSION=${MAJOR_VERSION} 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 385aadda5..ac833e601 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 9c74c3efc..387eb6756 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 1b8850216..a8b241f71 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 1cffb6916..bfe700a05 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 cd92468ff..e2370f892 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 a7ca6a80e..4490ab104 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 e76facd17..22d0e7309 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 72495c6a1..dd7c2b592 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 \ @@ -113,7 +114,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 fc0ff632b..73b5de96b 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 \ @@ -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/ 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/ \ @@ -136,8 +138,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 ecb4124d8..f59988ba9 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 b30f8c408..b446cc552 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 && \ @@ -88,7 +89,7 @@ ARG MAJOR_VERSION=master ARG ZBX_VERSION=${MAJOR_VERSION} 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 @@ -121,8 +122,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 && \ @@ -161,7 +163,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 \ @@ -190,7 +192,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 && \