Skip to content

Commit

Permalink
Merge pull request #526 from Security-Onion-Solutions/reyesj2/kakfa
Browse files Browse the repository at this point in the history
Kafka Dockerfile
  • Loading branch information
reyesj2 authored Apr 2, 2024
2 parents 48c19c9 + 6256e0a commit 892ee9f
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions so-kafka/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.

FROM ghcr.io/security-onion-solutions/oraclelinux:9

LABEL maintainer "Security Onion Solutions, LLC"
LABEL description="Kafka running in a docker container for use with Security Onion"

ARG KAFKA_DOWNLOAD=https://downloads.apache.org/kafka/3.7.0/
ARG KAFKA_TARNAME=kafka_2.13-3.7.0

RUN dnf update -y && \
dnf install -y java-11-openjdk java-11-openjdk-devel curl && \
dnf clean all

WORKDIR /

RUN groupadd --gid 960 kafka && \
adduser --uid 960 --gid 960 kafka

RUN curl -O ${KAFKA_DOWNLOAD}${KAFKA_TARNAME}.tgz && \
tar -xzf ${KAFKA_TARNAME}.tgz

RUN rm -f ${KAFKA_TARNAME}.tgz && \
mv ${KAFKA_TARNAME} kafka && \
chown -R 960:960 kafka

ENTRYPOINT ["/kafka/bin/kafka-server-start.sh", "/kafka/config/kraft/server.properties"]

0 comments on commit 892ee9f

Please sign in to comment.