{"id":22214043,"url":"https://github.com/xmlking/cdc-images","last_synced_at":"2025-09-23T17:57:16.621Z","repository":{"id":142313613,"uuid":"59449719","full_name":"xmlking/cdc-images","owner":"xmlking","description":"CDC Docker Images","archived":false,"fork":false,"pushed_at":"2016-06-10T02:06:23.000Z","size":72,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-05T08:05:24.945Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xmlking.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-23T03:33:35.000Z","updated_at":"2016-12-28T19:49:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"add4787d-9848-4cd3-a98c-6a6d7fd7cab4","html_url":"https://github.com/xmlking/cdc-images","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xmlking/cdc-images","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fcdc-images","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fcdc-images/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fcdc-images/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fcdc-images/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xmlking","download_url":"https://codeload.github.com/xmlking/cdc-images/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fcdc-images/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276622500,"owners_count":25675125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-23T02:00:09.130Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-02T21:13:01.897Z","updated_at":"2025-09-23T17:57:16.583Z","avatar_url":"https://github.com/xmlking.png","language":"Shell","readme":"CDC on Docker\n=============\nDocker images to demo Maxwell CDC solution with Kafka, NiFi. \n\n\n### Prerequisite  \n1. Server with Docker Engine and Docker CLI\n2. PC with [Docker Beta](https://beta.docker.com/)\n\n### Start \n```bash\n# Start Zookeeper and expose port 2181 for use by the host machine\ndocker run -d --name zookeeper -p 2181:2181 cdc/zookeeper\n\n# Start Kafka and expose port 9092 for use by the host machine\ndocker run -d --name kafka -p 9092:9092 --link zookeeper:zookeeper cdc/kafka\n\n# Start Schema Registry and expose port 8081 for use by the host machine\ndocker run -d --name schema-registry -p 8081:8081 --link zookeeper:zookeeper \\\n    --link kafka:kafka cdc/schema-registry\n\n# Start REST Proxy and expose port 8082 for use by the host machine\ndocker run -d --name rest-proxy -p 8082:8082 --link zookeeper:zookeeper \\\n    --link kafka:kafka --link schema-registry:schema-registry cdc/rest-proxy\n```\n\nIf all goes well, `docker ps` should give you something that looks like this:\n\n    CONTAINER ID        IMAGE                 COMMAND                  CREATED             STATUS              PORTS                                        NAMES\n    7933c0d27cad        cdc/rest-proxy        \"/usr/local/bin/rest-\"   31 minutes ago      Up 31 minutes       0.0.0.0:8082-\u003e8082/tcp                       rest-proxy\n    f992db359c63        cdc/schema-registry   \"/usr/local/bin/schem\"   31 minutes ago      Up 31 minutes       0.0.0.0:8081-\u003e8081/tcp                       schema-registry\n    1682ba009c78        cdc/kafka             \"/usr/local/bin/kafka\"   31 minutes ago      Up 31 minutes       0.0.0.0:9092-\u003e9092/tcp                       kafka\n    621aa2cc7240        cdc/zookeeper         \"/usr/local/bin/zk-do\"   31 minutes ago      Up 31 minutes       2888/tcp, 0.0.0.0:2181-\u003e2181/tcp, 3888/tcp   zookeeper\n\n### Access\n```\n# access log\ndocker logs --follow  $JOB\n# SSH to container \nsudo docker exec -i -t zookeeper /bin/bash\n```\n\n#### Start with Docker Compose \nStart all containers for fullstack\n\n```bash\ncd examples/fullstack\n# start all\ndocker-compose up\n# check\ndocker-compose ps\n# start all\ndocker-compose down\n```\n\n#### Running on Multiple Remote Hosts in Cluster\n\n```bash\ndocker run --name zk-1 -e zk_id=1 -e zk_server.1=172.16.42.101:2888:3888 -e zk_server.2=172.16.42.102:2888:3888 -e zk_server.3=172.16.42.103:2888:3888 -p 2181:2181 -p 2888:2888 -p 3888:3888 cdc/zookeeper\ndocker run --name zk-2 -e zk_id=2 -e zk_server.1=172.16.42.101:2888:3888 -e zk_server.2=172.16.42.102:2888:3888 -e zk_server.3=172.16.42.103:2888:3888 -p 2181:2181 -p 2888:2888 -p 3888:3888 cdc/zookeeper\ndocker run --name zk-3 -e zk_id=3 -e zk_server.1=172.16.42.101:2888:3888 -e zk_server.2=172.16.42.102:2888:3888 -e zk_server.3=172.16.42.103:2888:3888 -p 2181:2181 -p 2888:2888 -p 3888:3888 cdc/zookeeper\ndocker run --name kafka-1 -e KAFKA_BROKER_ID=1 -e KAFKA_ZOOKEEPER_CONNECT=172.16.42.101:2181,172.16.42.102:2181,172.16.42.103:2181 -p 9092:9092 cdc/kafka\ndocker run --name kafka-2 -e KAFKA_BROKER_ID=2 -e KAFKA_ZOOKEEPER_CONNECT=172.16.42.101:2181,172.16.42.102:2181,172.16.42.103:2181 -p 9092:9092 cdc/kafka\ndocker run --name kafka-3 -e KAFKA_BROKER_ID=3 -e KAFKA_ZOOKEEPER_CONNECT=172.16.42.101:2181,172.16.42.102:2181,172.16.42.103:2181 -p 9092:9092 cdc/kafka\n```\n\n## Changing settings\nThe images support using environment variables via the Docker `-e | --env` flags for setting various settings in the respective images. For example:\nFor the Zookeeper image use variables prefixed with `ZOOKEEPER_` with the variables expressed exactly as how they would appear in the `zookeeper.properties` file. As an example, to set `syncLimit` and `server.1` you'd run `docker run --name zk -e ZOOKEEPER_syncLimit=2 -e ZOOKEEPER__server.1=localhost:2888:3888 cdc/zookeeper`.\n\n### Testing\n\n```\n# Get a list of topics\ncurl \"http://localhost:8082/topics\"\n# Get info about one partition\ncurl \"http://localhost:8082/topics/_schemas\"\n# Produce a message using binary embedded data with value \"Kafka\" to the topic test\ncurl -X POST -H \"Content-Type: application/vnd.kafka.binary.v1+json\" \\\n      --data '{\"records\":[{\"value\":\"S2Fma2E=\"}]}' \"http://localhost:8082/topics/test\"\n# Create a consumer for binary data, starting at the beginning of the topic's log. \ncurl -X POST -H \"Content-Type: application/vnd.kafka.v1+json\" \\\n      --data '{\"format\": \"binary\", \"auto.offset.reset\": \"smallest\"}' \\\n      http://localhost:8082/consumers/my_binary_consumer\n# Then consume some data from a topic using the base URL in the first response.\ncurl -X GET -H \"Accept: application/vnd.kafka.binary.v1+json\" \\\n      http://localhost:8082/consumers/my_binary_consumer/instances/rest-consumer-1-230b71ef-a450-462e-93ee-a9eea451c316/topics/test\n# Finally, close the consumer with a DELETE to make it leave the group and clean up its resources.\ncurl -X DELETE \\\n      http://localhost:8082/consumers/my_binary_consumer/instances/rest-consumer-1-230b71ef-a450-462e-93ee-a9eea451c316\n```\n\n\n### Build\n\n```\n./build.sh\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmlking%2Fcdc-images","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxmlking%2Fcdc-images","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmlking%2Fcdc-images/lists"}