Sign inSign up

funnyzak/canal-server

By funnyzak

•Updated over 3 years ago

A docker image for canal server.

Image
0

1.4K

funnyzak/canal-server repository overview

⁠Canal Docker

Build Status GitHub repo size Latest commit GitHub release (latest by date) License

Docker images for canal⁠. The images is based on Official canal⁠ repo.

Sync with the latest version of canal.

This repository contains the following images:

⁠Canal Server

Docker Stars Docker Pulls Image Size

Download size of this image is:

Image Size

Docker hub image: funnyzak/canal-server⁠

Docker Pull Command: docker pull funnyzak/canal-server:latest

⁠Canal Adapter

Docker Stars Docker Pulls Image Size

Download size of this image is:

Image Size

Docker hub image: funnyzak/canal-adapter⁠

Docker Pull Command: docker pull funnyzak/canal-adapter:latest

⁠Canal Admin

Docker Stars Docker Pulls Image Size

Download size of this image is:

Image Size

Docker hub image: funnyzak/canal-admin⁠

Docker Pull Command: docker pull funnyzak/canal-admin:latest

⁠Usage

⁠Docker
# canal server
docker run -d --name canal-server \
  -v /path/to/canal-server/conf:/opt/canal/canal-server/conf \
  -v /path/to/canal-server/logs:/opt/canal/canal-server/logs \
  funnyzak/canal-server:latest

# canal adapter
docker run -d --name canal-adapter \
  -v /path/to/canal-adapter/conf:/opt/canal/canal-adapter/conf \
  -v /path/to/canal-adapter/logs:/opt/canal/canal-adapter/logs \
  funnyzak/canal-adapter:latest

# canal admin
docker run -d --name canal-admin \
  -v /path/to/canal-admin/conf:/opt/canal/canal-admin/conf \
  -v /path/to/canal-admin/logs:/opt/canal/canal-admin/logs \
  funnyzak/canal-admin:latest
⁠Compose
version: '3.7'
services:
  canal-server:
    image: funnyzak/canal-server:latest
    container_name: canal-server
    restart: on-failure
    environment:
      - canal.auto.scan=true
      - canal.destinations=example_destination
      - canal.instance.mysql.slaveId=166
      - canal.instance.master.address=mysql:3306
      - canal.instance.dbUsername=root
      - canal.instance.dbPassword=examplepwd123456
      - canal.instance.connectionCharset=UTF-8
      - canal.instance.tsdb.enable=true
      - canal.instance.gtidon=false
      - canal.instance.parser.parallelThreadSize=16
      - canal.instance.filter.regex=db_name.table_1,db_name.table_2
    volumes:
      - ./canal/canal-server/conf:/opt/canal/canal-server/conf
      - ./canal/canal-server/logs:/opt/canal/canal-server/logs
    networks:
      - my-network
    depends_on:
      - mysql
  canal-adapter:
    image: funnyzak/canal-adapter:latest
    container_name: canal-adapter
    restart: on-failure
    volumes:
      - ./canal/canal-adapter/conf:/opt/canal/canal-adapter/conf
      - ./canal/canal-adapter/logs:/opt/canal/canal-adapter/logs
    networks:
      - my-network
    depends_on:
      - canal-server
      - mysql
      - other storage...
  canal-admin:
    image: funnyzak/canal-admin:latest
    container_name: canal-admin
    restart: on-failure
    volumes:
      - ./canal/canal-admin/conf:/opt/canal/canal-admin/conf
      - ./canal/canal-admin/logs:/opt/canal/canal-admin/logs
    networks:
      - my-network
    depends_on:
      - canal-server
networks:
  default:
    external:
      name: my-network

More details about configuration, please refer to canal⁠.

⁠Docker Build

For building docker images, you can use the following command:

# build canal server
docker build \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg CANAL_COMPONENT_VERSION="1.1.6" \
--build-arg CANAL_COMPONENT_NAME="canal-server" \
--build-arg CANAL_DOWNLOAD_NAME="canal.deployer" \
-t funnyzak/canal-server .

# build canal adapter
docker build \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg CANAL_COMPONENT_VERSION="1.1.6" \
--build-arg CANAL_COMPONENT_NAME="canal-adapter" \
--build-arg CANAL_DOWNLOAD_NAME="canal.adapter" \
-t funnyzak/canal-adapter .

# build canal admin
docker build \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg CANAL_COMPONENT_VERSION="1.1.6" \
--build-arg CANAL_COMPONENT_NAME="canal-admin" \
--build-arg CANAL_DOWNLOAD_NAME="canal.admin" \
-t funnyzak/canal-admin .

⁠Contribution

If you have any questions or suggestions, please feel free to submit an issue or pull request.

⁠

⁠License

MIT License © 2023 funnyzak⁠

Tag summary

Content type

Image

Digest

sha256:369de2393…

Size

219 MB

Last updated

over 3 years ago

docker pull funnyzak/canal-server