(assuming you're using a Docker VM)
docker run -d -p 2181:2181 -p 9092:9092 --env ADVERTISED_HOST=192.168.99.100 --env ADVERTISED_PORT=9092 --name kafkaf spotify/kafka
docker exec -it kafkaf /bin/bash
/opt/kafka_2.11-0.10.1.0/bin/kafka-console-producer.sh --topic input --broker-list 127.0.0.1:9092