tidy up kafka cluster entry script

This commit is contained in:
Adam 2022-06-24 15:01:24 +02:00
parent 7b78f117fd
commit 8ee0cb396c
2 changed files with 3 additions and 8 deletions

View file

@ -1,4 +1,5 @@
./bin/kafka-storage.sh format \ # Format storage directories
RUN ./bin/kafka-storage.sh format \
--ignore-formatted \ --ignore-formatted \
--config ./server.properties \ --config ./server.properties \
--cluster-id "$(cat cluster_id)" --cluster-id "$(cat cluster_id)"

View file

@ -36,13 +36,7 @@ RUN ./bin/kafka-storage.sh random-uuid > cluster_id \
&& echo "Generated a Kafka Cluster ID: $(cat cluster_id)" && echo "Generated a Kafka Cluster ID: $(cat cluster_id)"
COPY ./kafka-server.properties ./server.properties COPY ./kafka-server.properties ./server.properties
COPY ./entrypoint.sh ./entrypoint.sh COPY --chmod=755 ./entrypoint.sh ./entrypoint.sh
# Format storage directories
RUN ./bin/kafka-storage.sh format \
--ignore-formatted \
--config ./server.properties \
--cluster-id "$(cat cluster_id)"
# launch the broker in KRaft mode, which means that it runs without ZooKeeper # launch the broker in KRaft mode, which means that it runs without ZooKeeper
ENTRYPOINT ["./entrypoint.sh"] ENTRYPOINT ["./entrypoint.sh"]