docker的安装部署(Docker快速安装Zookeeper的详细教程)
类别:服务器 浏览量:2049
时间:2021-10-08 00:16:14 docker的安装部署
Docker快速安装Zookeeper的详细教程Docker快速安装Zookeeper搜索Zookeeper镜像换了公司后很久没用过
Zookeeper
,最近因为在搞Elastic-Job
需要用到,这里简单记录下用Docker
搭建过程,下一篇会讲解怎么快速搭建集群。这里不会细讲如何搭建Docker
,如果想了解Docker
的朋友可以查看我之前写的Docker
系列文章。
evans-MacBook-Pro:tool evan$ docker search zookeeper NAME DESCRIPTION STARS OFFICIAL AUTOMATED zookeeper Apache ZooKeeper is an open-source server wh… 1099 [OK] jplock/zookeeper Builds a docker image for Zookeeper version … 165 [OK] wurstmeister/zookeeper 149 [OK] mesoscloud/zookeeper ZooKeeper 73 [OK] bitnami/zookeeper ZooKeeper is a centralized service for distr… 60 [OK] digitalwonderland/zookeeper Latest Zookeeper - clusterable 23 [OK] mbabineau/zookeeper-exhibitor 23 [OK] tobilg/zookeeper-webui Docker image for using `zk-web` as ZooKeeper… 15 [OK] debezium/zookeeper Zookeeper image required when running the De… 14 [OK] confluent/zookeeper [deprecated - please use confluentinc/cp-zoo… 13 [OK] 31z4/zookeeper Dockerized Apache Zookeeper. 9 [OK] thefactory/zookeeper-exhibitor Exhibitor-managed ZooKeeper with S3 backups … 6 [OK] engapa/zookeeper Zookeeper image optimised for being used int… 3 emccorp/zookeeper Zookeeper 2 harisekhon/zookeeper Apache ZooKeeper (tags 3.3 - 3.4) 2 [OK] paulbrown/zookeeper Zookeeper on Kubernetes (PetSet) 1 [OK] openshift/zookeeper-346-fedora20 ZooKeeper 3.4.6 with replication support 1 perrykim/zookeeper k8s - zookeeper ( forked k8s contrib ) 1 [OK] josdotso/zookeeper-exporter ref: https://github.com/carlpett/zookeeper_e… 1 [OK] duffqiu/zookeeper-cli 1 [OK] pravega/zookeeper-operator Kubernetes operator for Zookeeper 0 phenompeople/zookeeper Apache ZooKeeper is an open-source server wh… 0 [OK] dabealu/zookeeper-exporter zookeeper exporter for prometheus 0 [OK] midonet/zookeeper Dockerfile for a Zookeeper server. 0 [OK] humio/zookeeper-dev zookeeper build with zulu jvm.
默认拉取最新版本
evans-MacBook-Pro:tool evan$ docker pull zookeeper Using default tag: latest latest: Pulling from library/zookeeper b4d181a07f80: Pull complete 3ee45ae97306: Pull complete 567d410fadc4: Pull complete 891cdfaa81b9: Pull complete 7d811fb3c718: Pull complete 259c7b233169: Pull complete 19a00500c36e: Pull complete 907b63c43842: Pull complete Digest: sha256:d5965c84bbfc33f9a718d9eedec0137dd91e2298e213379549e75ebb0fa49d51 Status: Downloaded newer image for zookeeper:latest docker.io/library/zookeeper:latest
查询本地镜像
evans-MacBook-Pro:tool evan$ docker image ls REPOSITORY TAG IMAGE ID CREATED SIZE zookeeper latest 50d238989423 33 hours ago 269MB mysql latest c0cdc95609f1 6 weeks ago 556MB jenkins/jenkins latest 22c34b2deb6c 15 months ago 619MB postgres latest cf879a45faaa 17 months ago 394MB evan/centos dev 631b0bcb4bcc 18 months ago 191MB truevoly/oracle-12c latest 21789d4d876f 2 years ago 5.7GB
运行Zookeeper
指定端口为2181
,容器名称为zookeeper
evans-MacBook-Pro:tool evan$ docker run -d -p 2181:2181 --name zookeeper --restart always 50d238989423 548d103dabaa3c453f48a55f8dfeb3d241a60ad27fe0f11a114534ae5464b3fe
查看Zookeeper容器ID
evans-MacBook-Pro:tool evan$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 548d103dabaa 50d238989423 "/docker-entrypoint.…" 3 minutes ago Up 3 minutes 2888/tcp, 3888/tcp, 0.0.0.0:2181->2181/tcp, :::2181->2181/tcp, 8080/tcp zookeeper
通过容器ID进入Zookeeper
evans-MacBook-Pro:tool evan$ docker exec -it 548d103dabaa bash root@548d103dabaa:/apache-zookeeper-3.7.0-bin#
执行Zookeeper启动命令
root@548d103dabaa:/apache-zookeeper-3.7.0-bin# ./bin/zkCli.sh Connecting to localhost:2181 2021-06-27 15:15:06,993 [myid:] - INFO [main:Environment@98] - Client environment:zookeeper.version=3.7.0-e3704b390a6697bfdf4b0bef79e3da7a4f6bac4b, built on 2021-03-17 09:46 UTC ##...省略... WatchedEvent state:SyncConnected type:None path:null [zk: localhost:2181(CONNECTED) 0]
下载Zookeeper可视化控制台
这里我随便在Github下了一个 ,供大家参考
https://github.com/hellosix/zookeeper-manager/archive/refs/heads/master.zip
运行Zookeeper-manager代码
导入IDEA
,直接启动ZookeeperManagerApplication
,默认端口是8081
连接Zookeeper服务
这里添加一个新的服务,输入127.0.0.1:2181
到此这篇关于Docker快速安装Zookeeper的文章就介绍到这了,更多相关Docker安装Zookeeper内容请搜索开心学习网以前的文章或继续浏览下面的相关文章希望大家以后多多支持开心学习网!
您可能感兴趣
- docker容器基础入门认知网络篇(Docker 容器生命周期 架构 以及和VM之间的差异详解)
- docker容器使用流程(在Docker构建的容器中实现安装ping工具)
- docker的一些使用方法(使用Docker 安装 Jenkins的方法)
- docker swarm管理(Docker Swarm 服务编排之命令详解)
- docker容器的使用过程(详解docker容器的层的概念)
- docker容器使用redis服务(在Docker中使用Redis的步骤详解)
- docker中运行项目的配置(Docker中搭建配置Git环境的过程)
- docker容器运行环境(Docker 清理环境操作)
- docker容器访问权限(docker 容器自定义 hosts 网络访问操作)
- 日常操作docker命令(Docker常用命令详解)
- docker容器与宿主机通信(docker容器与宿主机的数据交互方式总结)
- docker容器测试环境构建(docker容器内安装TensorRT的问题)
- docker 加入k8s吗(k8s和Docker关系简单说明)
- docker-compose绑定端口失效(docker-compose创建网桥,添加子网,删除网卡的实现)
- 如何使用docker部署(使用远程Docker进行集成测试的环境搭建过程)
- docker怎么连接mysql(docker如何安装mysql)
- 鱼竿 夏钓短,冬钓长 ,一定是这样 认清优缺点在选竿(鱼竿夏钓短冬钓长)
- 鲢鳙钓底还是钓浮 流水的水域应怎样做钓(鲢鳙钓底还是钓浮)
- 入秋后的第二场苹果发布会来了 全新M1系列芯片登场(入秋后的第二场苹果发布会来了)
- 苹果正式发布自研芯片M1 5nm 32核心 彻底放弃Intel(苹果正式发布自研芯片M1)
- 苹果自研芯片跑分对比 A16芯片排名靠后,M1系列霸榜(苹果自研芯片跑分对比)
- X86处理器的梦魇 苹果M1自研芯片到底有多强(苹果M1自研芯片到底有多强)
热门推荐
- react新手指引页面编写(React+TypeScript进行项目构建案例讲解)
- html5播放视频的元素(HTML5在手机端实现视频全屏展示方法)
- linux中输出和追加命令(linux驱动开发中常用函数copy_from_user open read write详解)
- sqlserver数据库技术及应用教程(SQLServer2019 数据库的基本使用之图形化界面操作的实现)
- laravel怎样封装增删改查(laravel框架上传图片实现实时预览功能)
- angular开发详解(详解Angular组件生命周期一)
- js如何编辑数组对象里的数组(JS操作对象数组实现增删改查实例代码)
- 服务器使用docker(使用ssh连接docker服务器的方法)
- php数据类型图解(php使用filter_var函数判断邮箱,url,ip格式示例)
- css3字体怎么写(css3个性化字体_动力节点Java学院整理)
排行榜
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9