Docker Zookeeper

1、从仓库拉取Zookeeper镜像

  1. [root@iZuligp6e1dyzfZ /]# docker pull zookeeper
  2. [root@iZuligp6e1dyzfZ /]# docker images
  3. REPOSITORY TAG IMAGE ID CREATED SIZE
  4. docker.io/zookeeper latest 7341c5373a13 5 days ago 252 MB
  5. docker.io/mysql latest e3fcc9e1cc04 12 days ago 544 MB

image.png

2、运行一个Zookeeper容器

  1. [root@iZuligp6e1dyzfZ docker]# docker images
  2. REPOSITORY TAG IMAGE ID CREATED SIZE
  3. docker.io/zookeeper latest 7341c5373a13 5 days ago 252 MB
  4. docker.io/mysql latest e3fcc9e1cc04 12 days ago 544 MB
  5. [root@iZuligp6e1dyzfZ docker]# docker ps -a
  6. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
  7. NAMES
  8. [root@iZuligp6e1dyzfZ docker]# docker run --name zk01 -p 2180:2180 --restart always -d 7341c5373a13
  9. 6c06b127e03a0b14d6ef374570169d3ded2f85baf2a9165ca86bded94c642b58
  10. [root@iZuligp6e1dyzfZ docker]#

image.png