docker.InputKafkaApi is an API allows user to import json data, then put it into kafka topic.
1.0K
Base on tiangolo/uwsgi-nginx-flask:flask-index, we also installed following software into container for use.
Docker.InputKafkaApi is an API allows user to import json data, then put it into kafka topic.
Docker file content :
FROM tiangolo/uwsgi-nginx-flask:flask-index
RUN apt-get update
RUN apt-get -y install python-pip
RUN pip install kafka-python
COPY ./app /app
If you want to modify api, use volume as blow will be better.
docker run -d --name InputKafkaApi -p 8088:80 -v /{folder}/app:/app cutejaneii/Docker.InputKafkaApi
If you do NOT modify api, use following command to create a new container.
docker run -d --name InputKafkaApi -p 8088:80 cutejaneii/Docker.InputKafkaApi
http://your_ip:port/index -- you will see the content "Hello, this is MyKafkaApi."
json data:
{
"topic":"your_topic_name",
"input_data":"kafka_data"
}
We do NOT install kafka into this container, please install it if you need, or you can use the KAFKA outside from the container.
Content type
Image
Digest
Size
277.9 MB
Last updated
over 9 years ago
docker pull cutejaneii/docker.inputkafkaapi