拉取镜像
docker pull canal/canal-server:v1.1.7
启动容器并复制配置文件,然后删除容器
docker run --name canal-server canal/canal-server:v1.1.7docker cp canal-server:/home/admin/canal-server/conf /opt/canaldocker cp canal-server:/home/admin/canal-server/logs /opt/canaldocker stop canal-server & docker rm canal-server
docker-compose.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| version: '3.5' services: canal-server: image: canal/canal-server:v1.1.7 container_name: canal-server restart: always ports: - 11111:11111 privileged: true environment: - canal.auto.scan=true - canal.destinations=xc-canal - canal.instance.mysql.slaveId=9527 - canal.instance.master.address=117.50.76.162:3306 - canal.instance.dbUsername=tlread - canal.instance.dbPassword=cdxc_read_2024 - canal.instance.connectionCharset=UTF-8 - canal.instance.tsdb.enable=true - canal.instance.gtidon=false - canal.instance.parser.parallelThreadSize=16 - canal.instance.filter.regex=api.news_a_share_rel
|