- Initial release,
- Based on rx3-docker/java:1.1.0-mga9 image, - Kafka V3.9.0.
This commit is contained in:
commit
e85a67d6f1
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
*~
|
||||
*.old
|
58
Dockerfile
Normal file
58
Dockerfile
Normal file
@ -0,0 +1,58 @@
|
||||
# RX3-Docker/Kafka Dockerfile
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
ARG IMG_FROM_URL="rx3-docker/java:latest"
|
||||
|
||||
FROM ${IMG_FROM_URL}
|
||||
|
||||
ARG IMG_NAME
|
||||
ARG IMG_NAME_FULL
|
||||
ARG IMG_VERSION
|
||||
ARG IMG_MAINTAINER
|
||||
|
||||
LABEL org.rx3.${IMG_NAME}.name=${IMG_NAME_FULL}
|
||||
LABEL org.rx3.${IMG_NAME}.version=${IMG_VERSION}
|
||||
LABEL org.rx3.${IMG_NAME}.maintainer=${IMG_MAINTAINER}
|
||||
LABEL maintainer=${IMG_MAINTAINER}
|
||||
|
||||
ARG KAFKA_PORT
|
||||
|
||||
ARG KAFKA_HOME="/opt/appl/kafka"
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------------------------------
|
||||
ARG KAFKAD='#!/bin/bash \n\
|
||||
\n\
|
||||
usermod -u ${KAFKA_UID} kafka \n\
|
||||
groupmod -g ${KAFKA_GID} kafka \n\
|
||||
\n\
|
||||
chown -R kafka:kafka '${KAFKA_LIB}' '${KAFKA_LOG}' \n\
|
||||
\n\
|
||||
cd '${KAFKA_HOME}' \n\
|
||||
\n\
|
||||
KAFKA_CLUSTER_ID="$(bin/kafka-storage.sh random-uuid)" \n\
|
||||
bin/kafka-storage.sh format --standalone -t \$KAFKA_CLUSTER_ID -c config/kraft/reconfig-server.properties'
|
||||
#---------------------------------------------------------------------------------------------------
|
||||
|
||||
#---------------------------------------------------------------------------------------------------
|
||||
ARG KAFKAD_INI='[program:kafkad] \n\
|
||||
directory='${KAFKA_HOME}' \n\
|
||||
command='${KAFKA_HOME}'/bin/kafka-server-start.sh config/kraft/reconfig-server.properties'
|
||||
#---------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
RUN urpmi --force wget \
|
||||
&& wget -q -O /tmp/kafka.tgz https://downloads.apache.org/kafka/3.9.0/kafka_2.13-3.9.0.tgz \
|
||||
&& mkdir -p /opt/appl \
|
||||
&& cd /opt/appl \
|
||||
&& tar xf /tmp/kafka.tgz \
|
||||
&& mv kafka* kafka \
|
||||
&& rm /tmp/kafka.tgz \
|
||||
&& echo -e "${KAFKAD}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/init.d/kafkad \
|
||||
&& chmod a+x /etc/init.d/kafkad \
|
||||
&& ln -s /etc/init.d/kafkad /etc/rcD.d/S30kafkad \
|
||||
&& echo -e "${KAFKAD_INI}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/supervisord.d/kafkad.ini
|
||||
|
||||
EXPOSE ${KAFKA_PORT}
|
18
ReadMe.txt
Normal file
18
ReadMe.txt
Normal file
@ -0,0 +1,18 @@
|
||||
Welcome to Rx3-Docker/Kafka docker image!
|
||||
|
||||
|
||||
|
||||
This project aims to build a Kafka docker image used by other Rx3 packaging projects.
|
||||
|
||||
Features:
|
||||
- Curtently based on rx3-docker/server:1.1.0-mga9 image,
|
||||
- .
|
||||
|
||||
|
||||
Enjoy it!
|
||||
|
||||
Your Rx3 Team.
|
||||
|
||||
--
|
||||
arnaud@rx3.net
|
||||
https://git.rx3.org/gitea/rx3-docker/kafka
|
7
ReleaseNotes.txt
Normal file
7
ReleaseNotes.txt
Normal file
@ -0,0 +1,7 @@
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
Rx3-Docker/Kafka V 1.0.0 - A. GIBERT - 2024/11/xx
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
- Initial release,
|
||||
- Based on rx3-docker/java:1.1.0-mga9 image,
|
||||
- Kafka V3.9.0.
|
48
compose.yaml
Normal file
48
compose.yaml
Normal file
@ -0,0 +1,48 @@
|
||||
# Rx3 Proto Docker Image
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
name: ${HOST_NAME_PREFIX}
|
||||
|
||||
services:
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
kafka:
|
||||
container_name: ${KAFKA_HOST_NAME}
|
||||
hostname: ${KAFKA_HOST_NAME}
|
||||
|
||||
image: ${KAFKA_IMG_URL}
|
||||
|
||||
build:
|
||||
args:
|
||||
IMG_NAME: ${KAFKA_IMG_URL}
|
||||
IMG_NAME_FULL: ${KAFKA_IMG_NAME_FULL}
|
||||
IMG_VERSION: ${KAFKA_IMG_VERSION}
|
||||
IMG_MAINTAINER: ${KAFKA_IMG_MAINTAINER}
|
||||
IMG_FROM_URL: ${KAFKA_IMG_FROM_URL}
|
||||
|
||||
KAFKA_PORT: ${KAFKA_PORT_MAIN_INT}
|
||||
|
||||
restart: unless-stopped
|
||||
|
||||
environment:
|
||||
KAFKA_UID: ${KAFKA_USER_ID}
|
||||
KAFKA_GID: ${KAFKA_GROUP_ID}
|
||||
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:${KAFKA_PORT_MAIN_INT}"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
start_period: 60s
|
||||
start_interval: 10s
|
||||
retries: 30
|
||||
|
||||
volumes:
|
||||
- ./${KAFKA_LIB_EXT}:${KAFKA_LIB_INT}
|
||||
- ./${KAFKA_LOG_INIT_EXT}:${KAFKA_LOG_INIT_INT}
|
||||
- ./${KAFKA_LOG_SV_EXT}:${KAFKA_LOG_SV_INT}
|
||||
- ./${KAFKA_LOG_MAIN_EXT}:${KAFKA_LOG_MAIN_INT}
|
||||
|
||||
ports:
|
||||
- "127.0.0.1:${KAFKA_PORT_SV_EXT}:${KAFKA_PORT_SV_INT}"
|
||||
- "127.0.0.1:${KAFKA_PORT_MAIN_EXT}:${KAFKA_PORT_MAIN_INT}"
|
39
env.dist
Normal file
39
env.dist
Normal file
@ -0,0 +1,39 @@
|
||||
# Rx3-Docker/Kafka Docker Image
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Global Settings
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
ORG_NAME="rx3-docker"
|
||||
ORG_REGISTRY="docker.xor.rx3:5000"
|
||||
ORG_MAINTAINER='"Arnaud G. GIBERT" <arnaud@rx3.net>'
|
||||
|
||||
ORG_URL_PREFIX="${ORG_REGISTRY}/${ORG_NAME}"
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Image Settings
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
HOST_NAME_PREFIX=""
|
||||
|
||||
PORT_ENV_OFFSET=0
|
||||
PORT_SV_OFFSET=1000
|
||||
|
||||
|
||||
#------------------+----------+--------------------+--------------------------+------------------------------------------+------------+--------------------+---------------+------------+--------------+------------+-------+-------+-------+-------+--------------+--------------+
|
||||
# | Variable | Target Image | From Image | Module | Main Port | Admin Port | User | Group |
|
||||
# | Prefix | URL Prefix | Name | Name Full + Version | URL Prefix | Name + Version | Name | Version | Ext | Int | Ext | Int | Name / Id | Name / Id |
|
||||
#------------------+----------+--------------------+--------------------------+------------------------------------------+------------+--------------------+---------------+------------+--------------+------------+-------+-------+-------+-------+--------------+--------------+
|
||||
|
||||
docker_service_add KAFKA ${ORG_URL_PREFIX} kafka "Rx3-Docker/Kafka Docker Image" 1.0.0-mga9 ${ORG_URL_PREFIX} java 1.1.0-mga9 - - 9092 9092 - - apache apache
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# User Settings
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
SERVER_CROND_ENABLED="FALSE"
|
4
var/lib/kafka/.gitignore
vendored
Normal file
4
var/lib/kafka/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
# Ignore everything in this directory
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
4
var/log/init/.gitignore
vendored
Normal file
4
var/log/init/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
# Ignore everything in this directory
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
4
var/log/kafka/.gitignore
vendored
Normal file
4
var/log/kafka/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
# Ignore everything in this directory
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
4
var/log/supervisor/.gitignore
vendored
Normal file
4
var/log/supervisor/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
# Ignore everything in this directory
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
Loading…
Reference in New Issue
Block a user