mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2024-12-04 21:50:38 +01:00
100 lines
4.0 KiB
Docker
100 lines
4.0 KiB
Docker
FROM ubuntu:trusty
|
|
MAINTAINER Alexey Pustovalov <alexey.pustovalov@zabbix.com>
|
|
|
|
ARG APT_FLAGS_COMMON="-qq -y"
|
|
ARG APT_FLAGS_PERSISTANT="${APT_FLAGS_COMMON} --no-install-recommends"
|
|
ARG APT_FLAGS_DEV="${APT_FLAGS_COMMON} --no-install-recommends"
|
|
ARG DB_TYPE=mysql
|
|
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive TERM=xterm
|
|
|
|
RUN DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \
|
|
locale-gen $LC_ALL && \
|
|
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
|
echo "deb http://us.archive.ubuntu.com/ubuntu/ $DISTRIB_CODENAME multiverse" >> /etc/apt/sources.list && \
|
|
addgroup --system --quiet zabbix && \
|
|
adduser --quiet \
|
|
--system --disabled-login \
|
|
--ingroup zabbix \
|
|
--home /var/lib/zabbix/ \
|
|
--no-create-home \
|
|
zabbix && \
|
|
mkdir -p /etc/zabbix && \
|
|
mkdir -p /etc/zabbix/web && \
|
|
chown --quiet -R zabbix:root /etc/zabbix && \
|
|
apt-get ${APT_FLAGS_COMMON} update && \
|
|
apt-get ${APT_FLAGS_PERSISTANT} install \
|
|
supervisor \
|
|
mysql-client \
|
|
apache2 \
|
|
libapache2-mod-php5 \
|
|
php5-mysql \
|
|
php5-gd \
|
|
php5-json \
|
|
php5-ldap \
|
|
ttf-dejavu-core 1>/dev/null && \
|
|
apt-get ${APT_FLAGS_COMMON} autoremove && \
|
|
apt-get ${APT_FLAGS_COMMON} clean && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
ARG MAJOR_VERSION=3.2
|
|
ARG ZBX_VERSION=${MAJOR_VERSION}.0beta2
|
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
|
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} DB_TYPE=${DB_TYPE}
|
|
|
|
ADD conf/tmp/font-config /tmp/font-config
|
|
|
|
RUN apt-get ${APT_FLAGS_COMMON} update && \
|
|
apt-get ${APT_FLAGS_DEV} install \
|
|
subversion \
|
|
patch \
|
|
gettext 1>/dev/null && \
|
|
mkdir -p /var/lib/locales/supported.d/ && \
|
|
echo "en_US.UTF-8 UTF-8" > /var/lib/locales/supported.d/local && \
|
|
echo "ru_RU.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local && \
|
|
echo "ja_JP.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local && \
|
|
echo "cs_CZ.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local && \
|
|
echo "ko_KR.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local && \
|
|
echo "it_IT.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local && \
|
|
echo "pt_BR.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local && \
|
|
echo "sk_SK.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local && \
|
|
echo "uk_UA.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local && \
|
|
echo "fr_FR.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local && \
|
|
echo "pl_PL.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local && \
|
|
echo "zh_CN.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local && \
|
|
dpkg-reconfigure locales 1>/dev/null && \
|
|
cd /usr/share/ && \
|
|
svn --quiet export ${ZBX_SOURCES}/frontends/php/ zabbix 1>/dev/null && \
|
|
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 2>/dev/null && \
|
|
update-alternatives --install /usr/share/zabbix/fonts/graphfont.ttf \
|
|
zabbix-frontend-font /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf 10 && \
|
|
apt-get ${APT_FLAGS_COMMON} purge \
|
|
subversion \
|
|
patch \
|
|
gettext 1>/dev/null && \
|
|
apt-get ${APT_FLAGS_COMMON} autoremove && \
|
|
apt-get ${APT_FLAGS_COMMON} clean && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
EXPOSE 80/TCP 443/TCP
|
|
|
|
WORKDIR /usr/share/zabbix
|
|
|
|
VOLUME ["/etc/ssl/apache2"]
|
|
|
|
ADD conf/etc/supervisor/ /etc/supervisor/
|
|
ADD conf/etc/zabbix/apache.conf /etc/zabbix/
|
|
ADD conf/etc/zabbix/apache_ssl.conf /etc/zabbix/
|
|
ADD conf/etc/zabbix/web/zabbix.conf.php /etc/zabbix/web/
|
|
ADD conf/etc/php5/apache2/conf.d/99-zabbix.ini /etc/php5/apache2/conf.d/
|
|
ADD run_zabbix_component.sh /
|
|
|
|
ENTRYPOINT ["/bin/bash"]
|
|
|
|
CMD ["/run_zabbix_component.sh", "frontend", "mysql", "apache"]
|