1、下载xxl-jo-admin的镜像
docker pull xuxueli/xxl-job-admin:2.3.0
2、运行xxl-job容器
docker run -e PARAMS="--spring.datasource.url=jdbc:mysql://mysql.mysql-hf04-mqowye.svc.hfb.ipaas.cn:8066/xxl_job?Unicode=true&characterEncoding=UTF-8 --spring.datasource.username=admin --spring.datasource.password="xxxxxx" " -p 8010:8080 -v /logs:/data/applogs --name xxl-job-admin -d 24cc0d9dcf54
参数说明:
1、配置连接数据库的参数:-e PARAMS="–spring.datasource.url=jdbc:mysql://mysql.mysql-hf04-mqowye.svc.hfb.ipaas.cn:8066/xxl_job?Unicode=true&characterEncoding=UTF-8 --spring.datasource.username=admin --spring.datasource.password=“Iflytek@2021” "
2、端口映射: -p 8010:8080
3、日志:-v /logs:/data/applogs
4、给该容器取个名字:–name xxl-job-admin
5、-d;后台运行
6、24cc0d9dcf54:xxl-job-admin镜像id