github: https://github.com/alibaba/canal
docker pull canal/canal-server:v1.1.6
https://blog.51cto.com/u_15352995/5627759#Canal_38
docker run -d --name rocketmq-namesrv -p ip:9876:9876 -v /Users/zhaopengfei/docker/rocketmq/namesrv/logs:/root/logs -v /Users/zhaopengfei/docker/rocketmq/namesrv/store:/root/store apache/rocketmq:5.1.0 sh mqnamesrv
# 部署前配置下配置文件
docker run -d --name rocketmq-broker-a -p 10909:10909 -p 10911:10911 -v /Users/zhaopengfei/docker/rocketmq/broker/broker-a/logs:/root/logs -v /Users/zhaopengfei/docker/rocketmq/broker/broker-a/store:/root/store -v /Users/zhaopengfei/docker/rocketmq/broker/broker-a/conf:/home/rocketmq/rocketmq-5.1.0/conf apache/rocketmq:5.1.0 sh mqbroker -c /home/rocketmq/rocketmq-5.1.0/conf/broker.conf
docker run -d --name rocketmq-dashboard -e "JAVA_OPTS=-Drocketmq.namesrv.addr=ip:9876" -p 8080:8080 -t apacherocketmq/rocketmq-dashboard:latest
# 配置文件容器内地址
/home/rocketmq/rocketmq-5.1.0/conf/broker.conf
id c1 c2 c3 c4 c5 c6
1 1 1 1 1 2023-03-20 11:43:39 11
INSERT INTO dev.test (id, c1, c2, c3, c4, c5, c6) VALUES (1, 1, 1, 1, 1, '2023-03-20 11:43:39', '11');
docker pull canal/canal-server:v1.1.6
docker pull canal/canal-admin:v1.1.6
启动 canal-admin
docker run -it --name canal-admin -e canal.adminUser=admin -e canal.adminPasswd=admin -p 8089:8089 canal/canal-admin:v1.1.6
instance.properties
canal.instance.mysql.slaveId=2
canal.instance.master.address=192.168.1.63:3306
canal.instance.dbUsername=canal
canal.instance.dbPassword=123456
canal.instance.filter.regex = .\*\\\\..\*
canal.mq.topic=canal_topic
canal.properties
canal.serverMode = rocketMQ
rocketmq.producer.group = canal_group
rocketmq.namesrv.addr = 192.168.1.63:9876
docker run --name canal-server -p 11111:11111 -v /Users/zhaopengfei/docker/canal/conf/instance.properties:/home/admin/canal-server/conf/example/instance.properties -v /Users/zhaopengfei/docker/canal/conf/canal.properties://home/admin/canal-server/conf/canal.properties -e canal.admin.manager=192.168.1.63:8089 -e canal.admin.port=11110 -e canal.admin.user=admin -e canal.admin.passwd=4ACFE3202A5FF5CF467898FC58AAB1D615029441 -d a47437953c42
docker run --name canal-server -p 11111:11111 -v /Users/zhaopengfei/docker/canal/conf/instance.properties:/home/admin/canal-server/conf/example/instance.properties -v /Users/zhaopengfei/docker/canal/conf/canal.properties://home/admin/canal-server/conf/canal.properties -d a47437953c42
docker run --name canal115 -p 11111:11111 -id a47437953c42
/home/admin/canal-server/conf/canal.properties
/home/admin/canal-server/conf/example/instance.properties
/Users/zhaopengfei/docker/canal/conf/example
docker cp 2d4d492ebe1c:/home/admin/canal-server/conf/canal.properties /Users/zhaopengfei/docker/canal/conf/example
docker cp 2d4d492ebe1c:/home/admin/canal-server/conf/example/instance.properties /Users/zhaopengfei/docker/canal/conf/example