Install zookeeper on docker

1. Pull off the mirror

docker pull zookeeper:3.4.9

2. Start the container and add the mapping

docker run --privileged=true -d --name zookeeper --publish 2181:2181  -d zookeeper:3.4.9

3. Check whether it is activated

docker ps

4. Enter the zookeeper container

docker exec -it 容器ID /bin/bash
#进入到bin目录下
cd bin/

#连接zkClient
zkCli.sh
  • Use ls / to view registered services
    • Use ls /services/service name/your service id to see the service just registered
    • Use get /services/service name/your service id to see the relevant information of the service you just registered

Guess you like

Origin blog.csdn.net/houwanle/article/details/114651060