安装
docker pull registry.docker-cn.com/library/zookeeper
查看: docker images
[root@VM_0_4_centos ~]# docker images
REPOSITORY TAG IMAGE ID CREATED
registry.docker-cn.com/library/zookeeper latest 29d319df9c13 7 days ago 149 MB
运行
docker run --name myzookeeper --restart always -d 29d319df9c13
查看运行:docker ps
[root@VM_0_4_centos ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 4cd21004c2e2 29d319df9c13 "/docker-entrypoin..." About a minute ago Up About a minute 2888/tcp, 0.0.0.0:2181->2181/tcp, 3888/tcp myzookeeper
安装成功