For hosting kafka 2.3.0 distribution for VAPE project
Scripts are provided to facilitate with setting up local dev environment, they are located in scripts directory
run
sh ./scripts/vape-local-kafka-start.sh
to run a kafka broker (port 9092) and zookeeper (port 2128)
- navigate to project root
- run
docker build -t [image name] .
The built docker image contains kafka 2.3.0 distribution and zookeeper
Zookeeper must be run prior to any broker instances
run
docker run -it --rm -d --name [name] --net=host [image id] zookeeper $zookeeper_id
The above command boot up a docker container in which zookeeper runs. And all ports are exposed to host
run
docker run -it --rm -d --name [name] --net=host [image name] broker $id
The above command boot up a docker container in which broker runs. The last argument$id
represents the broker id (1, 2, 3 ...) All ports are exposed to host
docker ps
docker image ls
docker run --network host [image name]
docker run -p port:exposed-port [image name]
docker run --name [name] [image]
docker run -d --name [name] [image]
docker run -it --name [name] [image] arg1 arg2 ...
docker logs -f $container_id