2
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-12-21 13:23:02 +01:00

add zookeeper

This commit is contained in:
kev
2017-09-13 17:31:46 +08:00
parent 9e81fb7eb0
commit a02f8253ab
7 changed files with 163 additions and 0 deletions

40
zookeeper/README.md Normal file
View File

@@ -0,0 +1,40 @@
zookeeper
=========
![](http://zookeeper.apache.org/images/zookeeper_small.gif)
Apache [ZooKeeper][1] is an effort to develop and maintain an open-source server
which enables highly reliable distributed coordination.
## docker-compose.yml
```yaml
zookeeper:
image: zookeeper
ports:
- "2181:2181"
volumes:
- ./data:/data
- ./datalog:/datalog
restart: always
```
## Standalone Mode
```bash
$ docker-compose up -d
$ docker-compose exec zookeeper zkCli.sh
>>> help
>>> create /hello world
>>> get /hello
>>> delete /hello
>>> quit
```
Click [this][2] to learn more.
## Cluster Mode [TODO]
[1]: http://zookeeper.apache.org/
[2]: https://zookeeper.apache.org/doc/trunk/zookeeperStarted.html