Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
gmicroul authored Oct 21, 2024
1 parent fed3a7c commit d67481b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ COPY php.ini /etc/php/8.1/apache2/php.ini
# COPY server.sql /.
# COPY server.sql.zip /.
# 配置MySQL
RUN gunzip /usr/share/zabbix-sql-scripts/mysql/server.sql.gz \
RUN gunzip /usr/share/zabbix-sql-scripts/mysql/server.sql.gz && cp /usr/share/zabbix-sql-scripts/mysql/server.sql /. \
# RUN unzip /server.sql.zip && rm -f /server.sql.zip \
&& sed -i 's/bind-address/#bind-address/' /etc/mysql/mysql.conf.d/mysqld.cnf \
&& service mysql restart && mysql -e "create database zabbix character set utf8mb4 collate utf8mb4_bin;" \
&& service mysql restart && mysql -e "create user zabbix@localhost identified by 'password';" \
&& service mysql restart && mysql -e "grant all privileges on zabbix.* to zabbix@localhost;" \
&& service mysql restart && mysql -e "set global log_bin_trust_function_creators = 1;" \
&& service mysql restart && mysql -e "FLUSH PRIVILEGES;" \
&& service mysql restart && mysql -e "use zabbix;source /usr/share/zabbix-sql-scripts/mysql/server.sql;" \
&& service mysql restart && mysql -e "use zabbix;source /server.sql;" \
&& cp -r /usr/share/zabbix/ /var/www/html/
# 暴露Zabbix Frontend端口
EXPOSE 80 3306 11050
Expand Down

0 comments on commit d67481b

Please sign in to comment.