一、创建docker-compose.yml文件
version: '2'
services:
zabbix-mysql:
image: daocloud.io/library/mysql:8
container_name: zabbix-mysql
environment:
- MYSQL_ROOT_PASSWORD=123456
restart: always
zabbix-server:
image: monitoringartist/zabbix-xxl
links:
- zabbix-mysql:mysqlhost
container_name: zabbix-server
restart: always
depends_on:
- zabbix-mysql
ports:
- "8888:80"
environment:
- ZS_DBHost=mysqlhost
- ZS_DBUser=root
- ZS_DBPassword=123456
二、运行
docker-compose up -d