1、从仓库拉取Zookeeper镜像
[root@iZuligp6e1dyzfZ /]# docker pull zookeeper
[root@iZuligp6e1dyzfZ /]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/zookeeper latest 7341c5373a13 5 days ago 252 MB
docker.io/mysql latest e3fcc9e1cc04 12 days ago 544 MB
2、运行一个Zookeeper容器
[root@iZuligp6e1dyzfZ docker]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/zookeeper latest 7341c5373a13 5 days ago 252 MB
docker.io/mysql latest e3fcc9e1cc04 12 days ago 544 MB
[root@iZuligp6e1dyzfZ docker]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
NAMES
[root@iZuligp6e1dyzfZ docker]# docker run --name zk01 -p 2180:2180 --restart always -d 7341c5373a13
6c06b127e03a0b14d6ef374570169d3ded2f85baf2a9165ca86bded94c642b58
[root@iZuligp6e1dyzfZ docker]#