1 Star 1 Fork 2

大数据老司机/docker-compose-kafka

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
docker-compose.yaml 2.04 KB
一键复制 编辑 原始数据 按行查看 历史
大数据老司机 提交于 2023-05-21 18:21 . init
version: '3'
services:
kafka-node1:
image: registry.cn-hangzhou.aliyuncs.com/bigdata_cloudnative/kafka:2.12-3.4.0
user: "hadoop:hadoop"
container_name: kafka-node1
hostname: kafka-node1
restart: always
privileged: true
env_file:
- .env
volumes:
- ./config/kafka-node1/server.properties:${KAFKA_HOME}/config/server.properties
ports:
- "${KAFKA_NODE1_SERVER_PORT}:9092"
expose:
- 2888
- 3888
command: ["sh","-c","/opt/apache/bootstrap.sh"]
networks:
- hadoop-network
healthcheck:
test: ["CMD-SHELL", "netstat -tnlp|grep :9092 || exit 1"]
interval: 10s
timeout: 10s
retries: 5
kafka-node2:
image: registry.cn-hangzhou.aliyuncs.com/bigdata_cloudnative/kafka:2.12-3.4.0
user: "hadoop:hadoop"
container_name: kafka-node2
hostname: kafka-node2
restart: always
privileged: true
env_file:
- .env
volumes:
- ./config/kafka-node2/server.properties:${KAFKA_HOME}/config/server.properties
ports:
- "${KAFKA_NODE2_SERVER_PORT}:9092"
expose:
- 2888
- 3888
command: ["sh","-c","/opt/apache/bootstrap.sh"]
networks:
- hadoop-network
healthcheck:
test: ["CMD-SHELL", "netstat -tnlp|grep :9092 || exit 1"]
interval: 10s
timeout: 10s
retries: 5
kafka-node3:
image: registry.cn-hangzhou.aliyuncs.com/bigdata_cloudnative/kafka:2.12-3.4.0
user: "hadoop:hadoop"
container_name: kafka-node3
hostname: kafka-node3
restart: always
privileged: true
env_file:
- .env
volumes:
- ./config/kafka-node3/server.properties:${KAFKA_HOME}/config/server.properties
ports:
- "${KAFKA_NODE3_SERVER_PORT}:9092"
expose:
- 2888
- 3888
command: ["sh","-c","/opt/apache/bootstrap.sh"]
networks:
- hadoop-network
healthcheck:
test: ["CMD-SHELL", "netstat -tnlp|grep :9092 || exit 1"]
interval: 10s
timeout: 10s
retries: 5
# 连接外部网络
networks:
hadoop-network:
external: true
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hadoop-bigdata/docker-compose-kafka.git
git@gitee.com:hadoop-bigdata/docker-compose-kafka.git
hadoop-bigdata
docker-compose-kafka
docker-compose-kafka
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385