docker启动zookeeper客户端
时间: 2023-10-02 16:12:22 浏览: 141
要启动Zookeeper客户端,您可以使用以下命令:
```
docker run -it --rm --network mynet zookeeper zkCli.sh -server zookeeper-node1:2181,zookeeper-node2:2181
```
这个命令会在Docker容器中启动Zookeeper客户端,并连接到指定的Zookeeper服务器。其中,`mynet`是您创建的Docker网络的名称,`zookeeper-node1`和`zookeeper-node2`是Zookeeper服务器的容器名称,`2181`是Zookeeper服务器的端口号。您可以根据实际情况修改这些参数。
#### 引用[.reference_title]
- *1* [ZooKeeper学习笔记(二): Zookeeper的安装与启动(Docker)](https://blog.csdn.net/weixin_43194885/article/details/121549233)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [Docker 安装zookeeper 集群](https://blog.csdn.net/weixin_44627389/article/details/127726292)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文