From c593d361518931535d007c2d2d9c43430d436ce8 Mon Sep 17 00:00:00 2001 From: Alexey Pustovalov Date: Thu, 3 Oct 2019 15:39:55 +0300 Subject: [PATCH] Removed unnecessary arguments and redesigned docker files for Alpine images --- agent/alpine/Dockerfile | 34 +++++++++++++-------------- java-gateway/alpine/Dockerfile | 37 +++++++++++++++--------------- proxy-mysql/alpine/Dockerfile | 37 +++++++++++++++--------------- proxy-sqlite3/alpine/Dockerfile | 36 ++++++++++++++--------------- server-mysql/alpine/Dockerfile | 34 +++++++++++++-------------- server-pgsql/alpine/Dockerfile | 33 +++++++++++++------------- web-apache-mysql/alpine/Dockerfile | 31 +++++++++++-------------- web-apache-pgsql/alpine/Dockerfile | 31 +++++++++++-------------- 8 files changed, 129 insertions(+), 144 deletions(-) diff --git a/agent/alpine/Dockerfile b/agent/alpine/Dockerfile index ff15babaf..af3f3175e 100644 --- a/agent/alpine/Dockerfile +++ b/agent/alpine/Dockerfile @@ -1,23 +1,11 @@ FROM alpine:3.10 -ARG APK_FLAGS_PERSISTENT="--clean-protected --no-cache" -ARG APK_FLAGS_DEV="--no-cache" - -ARG MAJOR_VERSION=master -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} - LABEL org.opencontainers.image.title="Zabbix agent" \ org.opencontainers.image.authors="Alexey Pustovalov " \ org.opencontainers.image.vendor="Zabbix LLC" \ org.opencontainers.image.url="https://zabbix.com/" \ org.opencontainers.image.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \ - org.opencontainers.image.licenses="GPL v2.0" \ - org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ - org.opencontainers.image.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" STOPSIGNAL SIGTERM @@ -33,8 +21,7 @@ RUN set -eux && \ mkdir -p /var/lib/zabbix/enc && \ mkdir -p /var/lib/zabbix/modules && \ chown --quiet -R zabbix:root /var/lib/zabbix && \ - apk update && \ - apk add ${APK_FLAGS_PERSISTENT} \ + apk add --no-cache --clean-protected \ tini \ bash \ coreutils \ @@ -43,15 +30,26 @@ RUN set -eux && \ libldap && \ rm -rf /var/cache/apk/* +ARG MAJOR_VERSION=master +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} + +LABEL org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ + org.opencontainers.image.version="${ZBX_VERSION}" \ + org.opencontainers.image.source="${ZBX_SOURCES}" + RUN set -eux && \ - apk update && \ - apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ - alpine-sdk \ + apk add --no-cache --virtual build-dependencies \ autoconf \ automake \ curl-dev \ openssl-dev \ openldap-dev \ + g++ \ + pcre-dev \ + make \ git \ coreutils && \ cd /tmp/ && \ diff --git a/java-gateway/alpine/Dockerfile b/java-gateway/alpine/Dockerfile index 27bd08536..6ed72dd02 100644 --- a/java-gateway/alpine/Dockerfile +++ b/java-gateway/alpine/Dockerfile @@ -1,24 +1,11 @@ FROM alpine:3.10 -ARG APK_FLAGS_PERSISTENT="--clean-protected --no-cache" -ARG APK_FLAGS_DEV="--no-cache" - -ARG MAJOR_VERSION=master -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} \ - PATH=${PATH}:/usr/lib/jvm/default-jvm/bin/ JAVA_HOME=/usr/lib/jvm/default-jvm - LABEL org.opencontainers.image.title="Zabbix Java Gateway" \ org.opencontainers.image.authors="Alexey Pustovalov " \ org.opencontainers.image.vendor="Zabbix LLC" \ org.opencontainers.image.url="https://zabbix.com/" \ org.opencontainers.image.description="Zabbix Java Gateway performs native support for monitoring JMX applications" \ - org.opencontainers.image.licenses="GPL v2.0" \ - org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ - org.opencontainers.image.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" STOPSIGNAL SIGTERM @@ -30,19 +17,31 @@ RUN set -eux && \ zabbix && \ mkdir -p /etc/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix && \ - apk update && \ - apk add ${APK_FLAGS_PERSISTENT} \ + apk add --clean-protected --no-cache \ bash \ openjdk8-jre-base && \ rm -rf /var/cache/apk/* +ARG MAJOR_VERSION=master +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} \ + PATH=${PATH}:/usr/lib/jvm/default-jvm/bin/ JAVA_HOME=/usr/lib/jvm/default-jvm + +LABEL org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ + org.opencontainers.image.version="${ZBX_VERSION}" \ + org.opencontainers.image.source="${ZBX_SOURCES}" + RUN set -eux && \ - apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ + apk add --no-cache --virtual build-dependencies \ autoconf \ automake \ coreutils \ - openjdk8 \ - alpine-sdk && \ + git \ + g++ \ + make \ + openjdk8 && \ cd /tmp/ && \ git clone ${ZBX_SOURCES} --branch ${ZBX_VERSION} --depth 1 --single-branch zabbix-${ZBX_VERSION} && \ cd /tmp/zabbix-${ZBX_VERSION} && \ diff --git a/proxy-mysql/alpine/Dockerfile b/proxy-mysql/alpine/Dockerfile index 858410a0e..c50bbedef 100644 --- a/proxy-mysql/alpine/Dockerfile +++ b/proxy-mysql/alpine/Dockerfile @@ -1,24 +1,11 @@ FROM alpine:3.10 -ARG APK_FLAGS_PERSISTENT="--clean-protected --no-cache" -ARG APK_FLAGS_DEV="--no-cache" - -ARG MAJOR_VERSION=master -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} \ - MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL - LABEL org.opencontainers.image.title="Zabbix proxy (MySQL)" \ org.opencontainers.image.authors="Alexey Pustovalov " \ org.opencontainers.image.vendor="Zabbix LLC" \ org.opencontainers.image.url="https://zabbix.com/" \ org.opencontainers.image.description="Zabbix proxy with MySQL database support" \ - org.opencontainers.image.licenses="GPL v2.0" \ - org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ - org.opencontainers.image.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" STOPSIGNAL SIGTERM @@ -42,8 +29,7 @@ RUN set -eux && \ mkdir -p /var/lib/zabbix/ssl/ssl_ca && \ chown --quiet -R zabbix:root /var/lib/zabbix && \ mkdir -p /usr/share/doc/zabbix-proxy-mysql && \ - apk update && \ - apk add ${APK_FLAGS_PERSISTENT} \ + apk add --clean-protected --no-cache \ tini \ bash \ iputils \ @@ -59,20 +45,33 @@ RUN set -eux && \ fping && \ rm -rf /var/cache/apk/* +ARG MAJOR_VERSION=3.0 +ARG ZBX_VERSION=${MAJOR_VERSION}.28 +ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git + +ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ + MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL + +LABEL org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ + org.opencontainers.image.version="${ZBX_VERSION}" \ + org.opencontainers.image.source="${ZBX_SOURCES}" + RUN set -eux && \ - apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ + apk add --no-cache --virtual build-dependencies \ autoconf \ automake \ coreutils \ curl-dev \ + g++ \ + git \ + make \ libssh2-dev \ libxml2-dev \ mysql-dev \ net-snmp-dev \ openipmi-dev \ openldap-dev \ - unixodbc-dev \ - alpine-sdk && \ + unixodbc-dev && \ cd /tmp/ && \ git clone ${ZBX_SOURCES} --branch ${ZBX_VERSION} --depth 1 --single-branch zabbix-${ZBX_VERSION} && \ cd /tmp/zabbix-${ZBX_VERSION} && \ diff --git a/proxy-sqlite3/alpine/Dockerfile b/proxy-sqlite3/alpine/Dockerfile index abb03bd82..b91fb1019 100644 --- a/proxy-sqlite3/alpine/Dockerfile +++ b/proxy-sqlite3/alpine/Dockerfile @@ -1,25 +1,11 @@ FROM alpine:3.10 -ARG APK_FLAGS_PERSISTENT="--clean-protected --no-cache" -ARG APK_FLAGS_DEV="--no-cache" - -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} - -ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ - MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL - LABEL org.opencontainers.image.title="Zabbix proxy (SQLite3)" \ org.opencontainers.image.authors="Alexey Pustovalov " \ org.opencontainers.image.vendor="Zabbix LLC" \ org.opencontainers.image.url="https://zabbix.com/" \ org.opencontainers.image.description="Zabbix proxy with SQLite3 database support" \ - org.opencontainers.image.licenses="GPL v2.0" \ - org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ - org.opencontainers.image.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" STOPSIGNAL SIGTERM @@ -42,8 +28,7 @@ RUN set -eux && \ mkdir -p /var/lib/zabbix/ssl/keys && \ mkdir -p /var/lib/zabbix/ssl/ssl_ca && \ chown --quiet -R zabbix:root /var/lib/zabbix && \ - apk update && \ - apk add ${APK_FLAGS_PERSISTENT} \ + apk add --clean-protected --no-cache \ tini \ bash \ fping \ @@ -58,9 +43,20 @@ RUN set -eux && \ unixodbc && \ rm -rf /var/cache/apk/* +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} + +ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ + MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL + +LABEL org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ + org.opencontainers.image.version="${ZBX_VERSION}" \ + org.opencontainers.image.source="${ZBX_SOURCES}" + RUN set -eux && \ - apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ - alpine-sdk \ + apk add --no-cache --virtual build-dependencies \ autoconf \ automake \ coreutils \ @@ -72,6 +68,8 @@ RUN set -eux && \ openldap-dev \ sqlite-dev \ git \ + g++ \ + make \ unixodbc-dev && \ cd /tmp/ && \ git clone ${ZBX_SOURCES} --branch ${ZBX_VERSION} --depth 1 --single-branch zabbix-${ZBX_VERSION} && \ diff --git a/server-mysql/alpine/Dockerfile b/server-mysql/alpine/Dockerfile index e0e05b0d0..5436ffc38 100644 --- a/server-mysql/alpine/Dockerfile +++ b/server-mysql/alpine/Dockerfile @@ -1,24 +1,11 @@ FROM alpine:3.10 -ARG APK_FLAGS_PERSISTENT="--clean-protected --no-cache" -ARG APK_FLAGS_DEV="--no-cache" - -ARG MAJOR_VERSION=master -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} \ - MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL - LABEL org.opencontainers.image.title="Zabbix server (MySQL)" \ org.opencontainers.image.authors="Alexey Pustovalov " \ org.opencontainers.image.vendor="Zabbix LLC" \ org.opencontainers.image.url="https://zabbix.com/" \ org.opencontainers.image.description="Zabbix server with MySQL database support" \ - org.opencontainers.image.licenses="GPL v2.0" \ - org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ - org.opencontainers.image.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" STOPSIGNAL SIGTERM @@ -44,8 +31,7 @@ RUN set -eux && \ mkdir -p /var/lib/zabbix/ssl/ssl_ca && \ chown --quiet -R zabbix:root /var/lib/zabbix && \ mkdir -p /usr/share/doc/zabbix-server-mysql && \ - apk update && \ - apk add ${APK_FLAGS_PERSISTENT} \ + apk add --clean-protected --no-cache \ tini \ bash \ fping \ @@ -61,9 +47,19 @@ RUN set -eux && \ unixodbc && \ rm -rf /var/cache/apk/* +ARG MAJOR_VERSION=master +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} \ + MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL + +LABEL org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ + org.opencontainers.image.version="${ZBX_VERSION}" \ + org.opencontainers.image.source="${ZBX_SOURCES}" + RUN set -eux && \ - apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ - alpine-sdk \ + apk add --no-cache --virtual build-dependencies \ autoconf \ automake \ coreutils \ @@ -75,6 +71,8 @@ RUN set -eux && \ openipmi-dev \ openldap-dev \ git \ + g++ \ + make \ unixodbc-dev && \ cd /tmp/ && \ git clone ${ZBX_SOURCES} --branch ${ZBX_VERSION} --depth 1 --single-branch zabbix-${ZBX_VERSION} && \ diff --git a/server-pgsql/alpine/Dockerfile b/server-pgsql/alpine/Dockerfile index 14a2df0c6..50157fc2b 100644 --- a/server-pgsql/alpine/Dockerfile +++ b/server-pgsql/alpine/Dockerfile @@ -1,24 +1,11 @@ FROM alpine:3.10 -ARG APK_FLAGS_PERSISTENT="--clean-protected --no-cache" -ARG APK_FLAGS_DEV="--no-cache" - -ARG MAJOR_VERSION=master -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} \ - MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL - LABEL org.opencontainers.image.title="Zabbix server (PostgreSQL)" \ org.opencontainers.image.authors="Alexey Pustovalov " \ org.opencontainers.image.vendor="Zabbix LLC" \ org.opencontainers.image.url="https://zabbix.com/" \ org.opencontainers.image.description="Zabbix server with PostgreSQL database support" \ - org.opencontainers.image.licenses="GPL v2.0" \ - org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ - org.opencontainers.image.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" STOPSIGNAL SIGTERM @@ -44,8 +31,7 @@ RUN set -eux && \ mkdir -p /var/lib/zabbix/ssl/ssl_ca && \ chown --quiet -R zabbix:root /var/lib/zabbix && \ mkdir -p /usr/share/doc/zabbix-server-postgresql && \ - apk update && \ - apk add ${APK_FLAGS_PERSISTENT} \ + apk add --clean-protected --no-cache \ tini \ bash \ fping \ @@ -61,8 +47,19 @@ RUN set -eux && \ unixodbc && \ rm -rf /var/cache/apk/* +ARG MAJOR_VERSION=master +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} \ + MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL + +LABEL org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ + org.opencontainers.image.version="${ZBX_VERSION}" \ + org.opencontainers.image.source="${ZBX_SOURCES}" + RUN set -eux && \ - apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ + apk add --no-cache --virtual build-dependencies \ alpine-sdk \ autoconf \ automake \ @@ -75,6 +72,8 @@ RUN set -eux && \ openldap-dev \ postgresql-dev \ git \ + g++ \ + make \ unixodbc-dev && \ cd /tmp/ && \ git clone ${ZBX_SOURCES} --branch ${ZBX_VERSION} --depth 1 --single-branch zabbix-${ZBX_VERSION} && \ diff --git a/web-apache-mysql/alpine/Dockerfile b/web-apache-mysql/alpine/Dockerfile index 04535cf85..3943ceba1 100644 --- a/web-apache-mysql/alpine/Dockerfile +++ b/web-apache-mysql/alpine/Dockerfile @@ -1,23 +1,11 @@ FROM alpine:3.10 -ARG APK_FLAGS_PERSISTENT="--clean-protected --no-cache" -ARG APK_FLAGS_DEV="--no-cache" - -ARG MAJOR_VERSION=master -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} - LABEL org.opencontainers.image.title="Zabbix web-interface (Apache, MySQL)" \ org.opencontainers.image.authors="Alexey Pustovalov " \ org.opencontainers.image.vendor="Zabbix LLC" \ org.opencontainers.image.url="https://zabbix.com/" \ org.opencontainers.image.description="abbix web-interface based on Apache2 web server with MySQL database support" \ - org.opencontainers.image.licenses="GPL v2.0" \ - org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ - org.opencontainers.image.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" STOPSIGNAL SIGTERM @@ -31,8 +19,7 @@ RUN set -eux && \ mkdir -p /etc/zabbix && \ mkdir -p /etc/zabbix/web && \ chown --quiet -R zabbix:root /etc/zabbix && \ - apk update && \ - apk add ${APK_FLAGS_PERSISTENT} \ + apk add --clean-protected --no-cache \ apache2 \ bash \ curl \ @@ -53,7 +40,7 @@ RUN set -eux && \ php7-fileinfo \ php7-xmlreader \ php7-xmlwriter && \ - apk add ${APK_FLAGS_PERSISTENT} --no-scripts apache2-ssl && \ + apk add --clean-protected --no-cache --no-scripts apache2-ssl && \ rm -f "/etc/apache2/conf.d/default.conf" && \ rm -f "/etc/apache2/conf.d/ssl.conf" && \ sed -ri \ @@ -66,8 +53,18 @@ RUN set -eux && \ rm -f "/var/run/apache2/apache2.pid" && \ rm -rf /var/cache/apk/* +ARG MAJOR_VERSION=master +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} + +LABEL org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ + org.opencontainers.image.version="${ZBX_VERSION}" \ + org.opencontainers.image.source="${ZBX_SOURCES}" + RUN set -eux && \ - apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ + apk add --no-cache --virtual build-dependencies \ gettext \ git && \ cd /usr/share/ && \ diff --git a/web-apache-pgsql/alpine/Dockerfile b/web-apache-pgsql/alpine/Dockerfile index 78c7d6703..e9a26d691 100644 --- a/web-apache-pgsql/alpine/Dockerfile +++ b/web-apache-pgsql/alpine/Dockerfile @@ -1,23 +1,11 @@ FROM alpine:3.10 -ARG APK_FLAGS_PERSISTENT="--clean-protected --no-cache" -ARG APK_FLAGS_DEV="--no-cache" - -ARG MAJOR_VERSION=master -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} - LABEL org.opencontainers.image.title="Zabbix web-interface (Apache, PostgreSQL)" \ org.opencontainers.image.authors="Alexey Pustovalov " \ org.opencontainers.image.vendor="Zabbix LLC" \ org.opencontainers.image.url="https://zabbix.com/" \ org.opencontainers.image.description="abbix web-interface based on Apache2 web server with PostgreSQL database support" \ - org.opencontainers.image.licenses="GPL v2.0" \ - org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ - org.opencontainers.image.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" STOPSIGNAL SIGTERM @@ -31,8 +19,7 @@ RUN set -eux && \ mkdir -p /etc/zabbix && \ mkdir -p /etc/zabbix/web && \ chown --quiet -R zabbix:root /etc/zabbix && \ - apk update && \ - apk add ${APK_FLAGS_PERSISTENT} \ + apk add --clean-protected --no-cache \ apache2 \ bash \ curl \ @@ -52,7 +39,7 @@ RUN set -eux && \ php7-xmlreader \ php7-xmlwriter \ postgresql-client && \ - apk add ${APK_FLAGS_PERSISTENT} --no-scripts apache2-ssl && \ + apk add --clean-protected --no-cache --no-scripts apache2-ssl && \ rm -f "/etc/apache2/conf.d/default.conf" && \ rm -f "/etc/apache2/conf.d/ssl.conf" && \ sed -ri \ @@ -65,8 +52,18 @@ RUN set -eux && \ rm -f "/var/run/apache2/apache2.pid" && \ rm -rf /var/cache/apk/* +ARG MAJOR_VERSION=master +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} + +LABEL org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ + org.opencontainers.image.version="${ZBX_VERSION}" \ + org.opencontainers.image.source="${ZBX_SOURCES}" + RUN set -eux && \ - apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ + apk add --no-cache --virtual build-dependencies \ gettext \ git && \ cd /usr/share/ && \