1.查询zookeeper
docker search zookeeper
2.拉取zookeeper
docker pull zookeeper
或
docker pull jplock/zookeeper:3.4.10
3.查看镜像
docker images
或
docker image ls
4.启动zookeeper容器
docker run --name zookeeper --restart always -d zookeeper:3.4.10
或
docker run -t --name zookeeper1 --restart always -d zookeeper:3.4.10
5.查看容器
docker ps -a
6.查看容器实例进程信息
docker top 实例别名
docker top zookeeper
或
docker top 容器ID
docker top xxxx
或
ps -ef | grep zookeeper
7.停止zookeeper实例进程
docker stop zookeeper
8.启动实例
docker start zookeeper
9.重启实例
docker restart zookeeper
10.查看zookeeper进程日志
docker logs -f zookeeper
11.使用zookeeper命令行客户端连接zookeeper
docker exec -it 容器名称 /bin/bash