This guide uses Docker to run ZooKeeper.
For Docker installation, see Docker.
Create a directory to store your configuration and compose files.
mkdir -p /opt/zookeeper
cd /opt/zookeeper
Define a container for ZooKeeper.
services:
zookeeper:
image: apache/zookeeper:latest
ports:
- "2181:2181"
- "2888:2888"
- "3888:3888"
environment:
- ZOO_MY_ID=1
- ZOO_SERVERS=server.1=zookeeper:2888:3888;2181
- ZOO_ADMINSERVER_ENABLED=false
Start the container in the background.
docker compose up -d
apache/zookeeper (Docker Official Image)Any questions?
Feel free to contact us. Find all contact information on our contact page.