apache / pulsar

Apache Pulsar - distributed pub-sub messaging system
https://pulsar.apache.org/
Apache License 2.0
14.23k stars 3.58k forks source link

[Chore][Doc] Run a Pulsar cluster locally with Docker Compose #23137

Open salv0 opened 3 months ago

salv0 commented 3 months ago

Search before asking

What issue do you find in Pulsar docs?

In the docs https://pulsar.apache.org/docs/3.3.x/getting-started-docker-compose/ At Step 2: Create a Pulsar cluster, it should be very clear that creating the data directory is only for Linux. When doing the step on mac, the whole docker-compose up will fail because of permissions.

What is your suggestion?

Step 2: Create a Pulsar cluster

For Mac users:

To create a Pulsar cluster by using the compose.yml file, run the following command.

run docker compose up -d

For Linux users:

As preparation, create data directories and change the data directory ownership to uid(10000) which is the default user id used in the Pulsar Docker container.

sudo mkdir -p ./data/zookeeper ./data/bookkeeper
sudo chown -R 10000 data

then create a Pulsar cluster by using the compose.yml file by running the following command.

docker compose up -d

Any reference?

No response

Are you willing to submit a PR?

virtualathlete commented 2 months ago

Agree on mac you have to avoid this command: sudo chown -R 10000 data