docker kafka 一键搞定
1. docker network create app-tier 2. docker run -d --name zookeeper-server \ --network app-tier \ -e ALLOW_ANONYMOUS_LOGIN=yes \ bitnami/zookeeper:latest 3. docker run -d --name kafka-server \ --network app-tier \ -e ALLOW_PLAINTEXT_LISTENER=yes \ -e KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper-server:2181 \ bitnami/kafka:latest
按照上面一步步来,就行,不会出问题的。参考:https://registry.hub.docker.com/r/bitnami/kafka