mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-01-26 05:27:31 +02:00
41 lines
715 B
Markdown
41 lines
715 B
Markdown
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
|