commit 5f51c833635c59460031b6060c95d8cce32f4ff6 Author: wanggang <76527413@qq.com> Date: Mon Jun 7 16:19:32 2021 +0800 init diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..a0f84f4 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,18 @@ +#https://github.com/tangyibo/greenplum_docker +kind: pipeline +type: docker +name: default +platform: + arch: amd64 + os: linux +steps: + - name: publish + image: plugins/docker:19.03.8 + environment: + PLUGIN_REGISTRY: 10.10.14.176:5000 + PLUGIN_REPO: 10.10.14.176:5000/docker/kafka + settings: + insecure: true + tags: + - 2.8.0 + - ${DRONE_COMMIT_SHA:0:8} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3da6f75 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM openjdk:8u212-jre-alpine + +ENV KAFKA_VERSION=kafka_2.13-2.8.0 \ + KAFKA_HOME=/opt/kafka \ + PATH=${PATH}:${KAFKA_HOME}/bin + +COPY ${KAFKA_VERSION}.tgz /tmp + +RUN echo "https://mirror.tuna.tsinghua.edu.cn/alpine/v3.4/main/" > /etc/apk/repositories +RUN apk update && apk add --no-cache bash && /bin/bash && \ + cd /tmp && tar -xzf ${KAFKA_VERSION}.tgz -C /opt && \ + cd /opt && mv ${KAFKA_VERSION} kafka && cd ${KAFKA_HOME} && \ + bin/kafka-storage.sh format -t $(bin/kafka-storage.sh random-uuid) -c config/kraft/server.properties + +WORKDIR ${KAFKA_HOME} +EXPOSE 9092 9093 + +ENTRYPOINT [ "bin/kafka-server-start.sh","config/kraft/server.properties" ] diff --git a/README.md b/README.md new file mode 100644 index 0000000..d76e5df --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +docker push 76527413/kafka:2.8.0 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..66ce454 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,5 @@ +version: "3.8" +services: + image: + build: . + \ No newline at end of file diff --git a/kafka_2.13-2.8.0.tgz b/kafka_2.13-2.8.0.tgz new file mode 100644 index 0000000..29538c5 Binary files /dev/null and b/kafka_2.13-2.8.0.tgz differ diff --git a/server.properties b/server.properties new file mode 100644 index 0000000..f5d6e98 --- /dev/null +++ b/server.properties @@ -0,0 +1,22 @@ +process.roles=broker,controller +node.id=1 +controller.quorum.voters=1@localhost:9093 +listeners=PLAINTEXT://:9092,CONTROLLER://:9093 +inter.broker.listener.name=PLAINTEXT +advertised.listeners=PLAINTEXT://localhost:9092 +controller.listener.names=CONTROLLER +listener.security.protocol.map=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL +num.network.threads=3 +num.io.threads=8 +socket.send.buffer.bytes=102400 +socket.receive.buffer.bytes=102400 +socket.request.max.bytes=104857600 +log.dirs=/tmp/kraft-combined-logs +num.partitions=1 +num.recovery.threads.per.data.dir=1 +offsets.topic.replication.factor=1 +transaction.state.log.replication.factor=1 +transaction.state.log.min.isr=1 +log.retention.hours=168 +log.segment.bytes=1073741824 +log.retention.check.interval.ms=300000 \ No newline at end of file