CARVIEW |
Select Language
HTTP/2 200
date: Thu, 24 Jul 2025 14:03:21 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"762000c9f3d61f457090ffa911e26d13"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=06M%2B48gqIojtkv0DBpnWbvsRUevYmIBMBUvEKZT0N0tJltlbpX8sE2nTqy5v8dS8kMzF9VTypGPnY%2BGzGPxQGNtuZFMi1Fxrj%2FG4Q6%2B8FNzbd%2FOypX%2B1Bpy9KZVO2ge9Kw8z3jr4kJif0DksAj0aFWbRzfOiNBDuPrQRI2Q6FXJdA8JhjtPBecg7Lu7UGDGoEMvRIr%2BL2dHlNGOafYZYUygeuBVVDbw2Jfz9JVl0FHM1FAWmjSkQU4LVDnjxWj8IdGhgi2JNdxjJA5Q87iZS0g%3D%3D--uTQogCXz4Q1b3iaa--uN1JmbdlmOWGZl14t8cFPQ%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.901376133.1753365800; Path=/; Domain=github.com; Expires=Fri, 24 Jul 2026 14:03:20 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Fri, 24 Jul 2026 14:03:20 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 851E:2E54B6:ACCE6:C3F31:68823D28
Docker QuickStart · alibaba/canal Wiki · GitHub
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Docker QuickStart
agapple edited this page Oct 29, 2018
·
5 revisions
- QuickStart : https://github.com/alibaba/canal/wiki/QuickStart
- AdminGuide : https://github.com/alibaba/canal/wiki/AdminGuide
Dockerfile文件:https://github.com/alibaba/canal/blob/master/docker/Dockerfile 注意点:
- 基于centos6.7最小镜像进行构建,安装一些必须的工具,比如tar/dstat/nc/man等,大概400MB
- 默认安装jdk 1.8,build.sh脚本里会自动下载jdk然后copy到docker里,大概400MB
- 自带日志清理脚本,会识别硬盘超过80%时,自动清理
因此,canal整个docker镜像在900MB左右,有一定的优化空间,比如使用jre、减少一些非必须的命令等
-
访问docker hub获取最新的版本 访问:https://hub.docker.com/r/canal/canal-server/tags/
-
下载对应的版本,比如最新版为1.1.1
docker pull canal/canal-server:v1.1.1
git clone git@github.com:alibaba/canal.git
cd canal/docker && sh build.sh
docker目录下自带了一个run.sh脚本: https://github.com/alibaba/canal/blob/master/docker/run.sh
sh run.sh
Usage:
run.sh [CONFIG]
example:
run.sh -e canal.instance.master.address=127.0.0.1:3306 \
-e canal.instance.dbUsername=canal \
-e canal.instance.dbPassword=canal \
-e canal.instance.connectionCharset=UTF-8 \
-e canal.instance.tsdb.enable=true \
-e canal.instance.gtidon=false \
-e canal.instance.filter.regex=.*\\..*
实际运行的例子:
# 下载脚本
wget https://raw.githubusercontent.com/alibaba/canal/master/docker/run.sh
# 构建一个destination name为test的队列
sh run.sh -e canal.auto.scan=false \
-e canal.destinations=test \
-e canal.instance.master.address=127.0.0.1:3306 \
-e canal.instance.dbUsername=canal \
-e canal.instance.dbPassword=canal \
-e canal.instance.connectionCharset=UTF-8 \
-e canal.instance.tsdb.enable=true \
-e canal.instance.gtidon=false \
注意点:
- -e参数里可以指定以前canal.properties/instance.properties里的所有配置的key和value,canal-server启动时会有限读取-e指定的变量,具体可参考AdminGuide
- docker模式下,单docker实例只能运行一个instance,主要为配置问题。如果需要运行多instance时,可以自行制作一份docker镜像即可
看到successful之后,就代表canal-server启动成功,可以启动canal-client链接上来进行binlog订阅了
- Home
- Introduction / 简介
- Quick Start
- Client Guide
- Canal Admin
- Canal Performance
- AdminGuide
- DevGuide
- BinlogChange(Mysql5.6)
- BinlogChange(MariaDB)
- BinlogChange(MySQL8)
- TableMetaTSDB
- ReleaseNotes
- Download
- FAQ / 常见问题解答
Clone this wiki locally
You can’t perform that action at this time.