krisgeus / docker-kafka Goto Github PK
View Code? Open in Web Editor NEWCombined Zookeeper and Kafka centos7 docker image
Combined Zookeeper and Kafka centos7 docker image
It would be nice if you could update this image to kafka 2.4.0 / scala 2.13.
Also, could you add a version tags to this repo and change your Docker build settings to something like this:
So that the docker images always get a version tag and get built automatically when a new tag is created in this repo.
Hello,
I tried following the instructions on the readme and when I reached the step to test the Kafka instance, when I run the command kafka-console-producer --broker-list kafka:9092 --topic test
and input the message "message1"
Operating System: MacOS
Version: 10.14.6
Is there anything I'm doing wrong
There is no env variable available to change zookeeper port.
When I try to build this image, there are two issues
The locale is not set, it gives this warning Failed to set locale, defaulting to C
and I fixed that as per this: CentOS/sig-cloud-instance-images#71 (comment)
It probably doesn't matter, as installing all those extra locales would make the image larger.
The second issue is when trying to install supervisor, it gives this error:
Error: Unable to find a match
The command '/bin/sh -c yum update -y && yum install -y epel-release wget nc net-tools openssl krb5-workstation krb5-libs java which && yum install -y supervisor && wget -q http://apache.mirrors.spacedump.net/kafka/"$KAFKA_VERSION"/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION".tgz -O /tmp/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION".tgz && tar xfz /tmp/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION".tgz -C /opt && rm /tmp/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION".tgz && yum clean all'
returned a non-zero code: 1
I found that the supervisor package just isn't in the repo (anymore?).
I opened a shell into the base image
docker run -it centos bash
Then checked for the package
# yum install epel-release
# yum update
# yum info supervisor
Error: No matching Packages to list
If the package is not there, then the way to install it is with pip. I also found that python-pip
is not in the repo, it's now called either python3-pip
( or the older v2)
This is what I ended up using which works
# Install Kafka, Zookeeper and other needed things
RUN yum update -y && \
yum install -y epel-release wget nc net-tools openssl krb5-workstation krb5-libs java which && \
yum install -y python3-pip && \
pip3 install supervisor && \
wget -q \
http://apache.mirrors.spacedump.net/kafka/"$KAFKA_VERSION"/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION".tgz \
-O /tmp/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION".tgz && \
tar xfz /tmp/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION".tgz -C /opt && \
rm /tmp/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION".tgz && \
yum clean all
This doesn't run though, it can't find the supervisord.conf
file in any of the default locations, perhaps that file was placed by the yum packaged version and is not when installing with pip, not sure yet.
Thanks for your work! Unfortunately there is no license. So it is dangerous to build upon.
Would you mind to add a license? What about MIT?
kafka | 2020-03-27 21:46:33,260 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message. kafka | 2020-03-27 21:46:33,260 INFO Included extra file "/etc/supervisord.d/initialize.ini" during parsing kafka | 2020-03-27 21:46:33,260 INFO Included extra file "/etc/supervisord.d/kafka.ini" during parsing kafka | 2020-03-27 21:46:33,260 INFO Included extra file "/etc/supervisord.d/zookeeper.ini" during parsing kafka | /usr/lib/python3.6/site-packages/supervisor/options.py:471: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security. kafka | 'Supervisord is running as root and it is searching ' kafka | Error: Cannot open an HTTP server: socket.error reported errno.ENOENT (2) kafka | For help, use /usr/bin/supervisord -h
Always giving me this error
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.