Skip to content

分布式任务调度平台XXL-JOB 官网: https://www.xuxueli.com/xxl-job/#2.3%20%E9%85%8D%E7%BD%AE%E9%83%A8%E7%BD%B2%E2%80%9C%E8%B0%83%E5%BA%A6%E4%B8%AD%E5%BF%83%E2%80%9D

拉取镜像

docker pull xuxueli/xxl-job-admin:2.4.0

创建容器运行

1. `docker run -p 8080:8080 -v /tmp:/data/applogs --name xxl-job-admin -d xuxueli/xxl-job-admin:{指定版本}`

3. `/**`
4. `* 如需自定义 mysql 等配置,可通过 "-e PARAMS" 指定,参数格式 PARAMS="--key=value --key2=value2" ;`
5. `* 配置项参考文件:/xxl-job/xxl-job-admin/src/main/resources/application.properties`
6. `* 如需自定义 JVM内存参数 等配置,可通过 "-e JAVA_OPTS" 指定,参数格式 JAVA_OPTS="-Xmx512m" ;`
7. `*/`
docker run -p 8080:8080 -v /tmp:/data/applogs --name xxl-job-admin -e PARAMS="--spring.datasource.url=jdbc:mysql://127.0.0.1:3306/xxl_job?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai --spring.datasource.username=root --spring.datasource.password=WangShuai0815@123"  -d xuxueli/xxl-job-admin:2.4.0



sudo docker run --name xxl-job-admin -p 8080:8080 \
 -e "PARAMS=single-node" \
 -e ES_JAVA_OPTS="-Xms84m -Xmx512m" \
 -v /opt/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml \
 -v /opt/elasticsearch/data:/usr/share/elasticsearch/data \
 -v /opt/elasticsearch/plugins:/usr/share/elasticsearch/plugins \
 -v /opt/elasticsearch/logs:/usr/share/elasticsearch/logs \
 -d elasticsearch:7.17.7

waitingresult.com