zabbix-server/Dockerfile

37 lines
990 B
Docker
Raw Normal View History

2022-09-12 15:18:54 +05:00
FROM debian:11-slim
ARG ZABBIX_URL=https://repo.zabbix.com/zabbix/6.0/debian/pool/main/z/zabbix-release/zabbix-release_6.0-3%2Bdebian11_all.deb
WORKDIR /app
RUN chmod 777 /app
RUN apt update -y
RUN apt upgrade -y
RUN apt install locales -y
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN apt install ca-certificates wget curl neofetch nano vim -y --no-install-recommends
RUN wget $ZABBIX_URL
RUN dpkg -i zabbix-release*.deb
RUN rm zabbix-release*.deb
RUN apt update -y
RUN apt install php php-fpm -y --no-install-recommends
RUN apt install zabbix-server-mysql zabbix-frontend-php zabbix-nginx-conf zabbix-sql-scripts -y --no-install-recommends
#RUN apt purge mysql* mariadb* -y
RUN apt auto-remove -y
RUN apt update -y
RUN apt upgrade -y
COPY startservices.sh .
RUN chmod +x startservices.sh
RUN rm /etc/nginx/sites-enabled/default
RUN mkdir /run/php/
#Start Services
CMD ["./startservices.sh"]