zookeeper参照https://www.cnblogs.com/wintersoft/p/11128484.html
mkdir /opt/kafka -p
vim /opt/kafka/Dockerfile
FROM wurstmeister/kafka:2.12-2.3.0 EXPOSE 9092
sudo mkdir -p /var/log/kafka;sudo chmod -R 777 /var/log/kafka
vim /opt/kafka/docker-compose.yml
version: '2'
services:
kafka:
image: v-kafka
container_name: kafka
build:
context: .
dockerfile: Dockerfile
restart: always
ports:
- "9092