sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-‘EOF’
{
“registry-mirrors”: [“https://59uxyshn.mirror.aliyuncs.com“]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
docker run -d —name kafka —publish 9092:9092 --link zookeeper:zookeeper \
—env KAFKA_BROKER_ID=100 --env HOST_IP=192.168.1.107 \
—env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181 \
—env KAFKA_ADVERTISED_HOST_NAME=192.168.1.107 \
—env KAFKA_ADVERTISED_PORT=9092 \
—restart=always \
wurstmeister/kafka
docker run -d —name kafka-manager \
—link zookeeper:zookeeper \
—link kafka:kafka -p 9000:9000 \
—restart=always \
—env ZK_HOSTS=zookeeper:2181 \
sheepkiller/kafka-manager