mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-08-09 08:35:05 +02:00
Removed unnecessary code from Alpine images
This commit is contained in:
@ -1,23 +1,23 @@
|
||||
FROM alpine:3.10
|
||||
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
||||
|
||||
ARG BUILD_DATE
|
||||
ARG VCS_REF
|
||||
ARG APK_FLAGS_PERSISTENT="--clean-protected --no-cache"
|
||||
ARG APK_FLAGS_DEV="--no-cache"
|
||||
|
||||
ARG APK_FLAGS_COMMON="-q"
|
||||
ARG APK_FLAGS_PERSISTENT="${APK_FLAGS_COMMON} --clean-protected --no-cache"
|
||||
ARG APK_FLAGS_DEV="${APK_FLAGS_COMMON} --no-cache"
|
||||
ENV TERM=xterm \
|
||||
ZBX_TYPE=frontend ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=apache
|
||||
ARG MAJOR_VERSION=master
|
||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
LABEL org.label-schema.name="zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}-alpine" \
|
||||
org.label-schema.vendor="Zabbix LLC" \
|
||||
org.label-schema.url="https://zabbix.com/" \
|
||||
org.label-schema.description="Zabbix web-interface based on Apache2 web server with MySQL database support" \
|
||||
org.label-schema.vcs-ref="${VCS_REF}" \
|
||||
org.label-schema.build-date="${BUILD_DATE}" \
|
||||
org.label-schema.schema-version="1.0" \
|
||||
org.label-schema.license="GPL v2.0"
|
||||
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 <alexey.pustovalov@zabbix.com>" \
|
||||
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}"
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
@ -53,18 +53,18 @@ RUN set -eux && \
|
||||
php7-xmlreader \
|
||||
php7-xmlwriter && \
|
||||
apk add ${APK_FLAGS_PERSISTENT} --no-scripts apache2-ssl && \
|
||||
rm -f "/etc/apache2/conf.d/default.conf" && \
|
||||
rm -f "/etc/apache2/conf.d/ssl.conf" && \
|
||||
sed -ri \
|
||||
-e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \
|
||||
-e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \
|
||||
"/etc/apache2/httpd.conf" && \
|
||||
sed -ri \
|
||||
-e 's!^(\s*PidFile)\s+\S+!\1 "/var/run/httpd.pid"!g' \
|
||||
"/etc/apache2/conf.d/mpm.conf" && \
|
||||
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 ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||
|
||||
LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||
org.label-schema.version="${ZBX_VERSION}" \
|
||||
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 set -eux && \
|
||||
apk add ${APK_FLAGS_DEV} --virtual build-dependencies \
|
||||
gettext \
|
||||
@ -78,7 +78,8 @@ RUN set -eux && \
|
||||
rm -f conf/zabbix.conf.php && \
|
||||
rm -rf tests && \
|
||||
./locale/make_mo.sh && \
|
||||
apk del ${APK_FLAGS_COMMON} --purge --no-network \
|
||||
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
apk del --purge --no-network \
|
||||
build-dependencies && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
|
Reference in New Issue
Block a user