diff --git a/bitnami/kafka/4.2/debian-12/Dockerfile b/bitnami/kafka/4.2/debian-12/Dockerfile index bd8240d77a99..5f1280ad6fd7 100644 --- a/bitnami/kafka/4.2/debian-12/Dockerfile +++ b/bitnami/kafka/4.2/debian-12/Dockerfile @@ -8,7 +8,7 @@ ARG JAVA_EXTRA_SECURITY_DIR="/bitnami/java/extra-security" ARG TARGETARCH LABEL org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \ - org.opencontainers.image.created="2026-04-08T19:29:36Z" \ + org.opencontainers.image.created="2026-05-07T10:15:45Z" \ org.opencontainers.image.description="Application packaged by Broadcom, Inc." \ org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/kafka/README.md" \ org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/kafka" \ @@ -29,7 +29,7 @@ RUN --mount=type=secret,id=downloads_url,env=SECRET_DOWNLOADS_URL \ DOWNLOADS_URL=${SECRET_DOWNLOADS_URL:-${DOWNLOADS_URL}} ; \ mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ || exit 1 ; \ COMPONENTS=( \ - "jre-17.0.18-10-1-linux-${OS_ARCH}-debian-12" \ + "jre-17.0.19-11-0-linux-${OS_ARCH}-debian-12" \ "kafka-4.2.0-0-linux-${OS_ARCH}-debian-12" \ ) ; \ for COMPONENT in "${COMPONENTS[@]}"; do \ @@ -53,7 +53,7 @@ RUN /opt/bitnami/scripts/java/postunpack.sh RUN /opt/bitnami/scripts/kafka/postunpack.sh ENV APP_VERSION="4.2.0" \ BITNAMI_APP_NAME="kafka" \ - IMAGE_REVISION="2" \ + IMAGE_REVISION="3" \ JAVA_HOME="/opt/bitnami/java" \ PATH="/opt/bitnami/java/bin:/opt/bitnami/kafka/bin:$PATH" diff --git a/bitnami/kafka/README.md b/bitnami/kafka/README.md index 9e4ac79c70d8..5e5bfb041607 100644 --- a/bitnami/kafka/README.md +++ b/bitnami/kafka/README.md @@ -11,6 +11,14 @@ Trademarks: This software listing is packaged by Bitnami. The respective tradema docker run --name kafka bitnami/kafka:latest ``` +## Using `docker-compose.yml` + +The docker-compose.yaml file of this container can be found in the [Bitnami Containers repository](https://github.com/bitnami/containers/). + +[https://github.com/bitnami/containers/tree/main/bitnami/kafka/docker-compose.yml](https://github.com/bitnami/containers/tree/main/bitnami/kafka/docker-compose.yml) + +Please be aware this file has not undergone internal testing. Consequently, we advise its use exclusively for development or testing purposes. For production-ready deployments, we highly recommend utilizing its associated [Bitnami Helm chart](https://github.com/bitnami/charts/tree/main/bitnami/kafka). + ## Why use Bitnami Secure Images? Those are hardened, minimal CVE images built and maintained by Bitnami. Bitnami Secure Images are based on the cloud-optimized, security-hardened enterprise [OS Photon Linux](https://vmware.github.io/photon/). Why choose BSI images? @@ -44,15 +52,11 @@ Learn more about the Bitnami tagging policy and the difference between rolling t The Bitnami Apache Kafka Docker image is only available to [Bitnami Secure Images](https://bitnami.com) customers. -## Using `docker-compose.yaml` - -Please be aware this file has not undergone internal testing. Consequently, we advise its use exclusively for development or testing purposes. For production-ready deployments, we highly recommend utilizing its associated [Bitnami Helm chart](https://github.com/bitnami/charts/tree/main/bitnami/kafka). - ## Persisting your data If you remove the container all your data and configurations will be lost, and the next time you run the image the database will be reinitialized. To avoid this loss of data, you should mount a volume that will persist even after the container is removed. -> Note: If you have already started using your database, follow the steps on [backing up](#backing-up-your-container) and [restoring](#restoring-a-backup) to pull the data from your running container down to your host. +> Note: If you have already started using your data, preserve the `/bitnami/kafka` volume contents before removing the container so you can mount the same data in a new container. The image exposes a volume at `/bitnami/kafka` for the Apache Kafka data. For persistence you can mount a directory at this location from your host. If the mounted directory is empty, it will be initialized on the first run. @@ -128,16 +132,6 @@ Additionally, any environment variable beginning with `KAFKA_CFG_` will be mappe docker run --name kafka -e KAFKA_CFG_PROCESS_ROLES ... -e KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=true bitnami/kafka:latest ``` -or by modifying the [`docker-compose.yml`](https://github.com/bitnami/containers/blob/main/bitnami/kafka/docker-compose.yml) file present in this repository: - -```yaml -kafka: - ... - environment: - - KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=true - ... -``` - ### Security In order to configure authentication, you must configure the Apache Kafka listeners properly. Let's see an example to configure Apache Kafka with `SASL_SSL` authentication for communications with clients, and `SASL` authentication for controller-related communications. @@ -266,69 +260,7 @@ The Bitnami Apache Kafka Docker image from the [Bitnami Secure Images](https://g ## Logging -The Bitnami Apache Kafka Docker image sends the container logs to the `stdout`. To view the logs: - -```console -docker logs kafka -``` - -Or using Docker Compose: - -```console -docker-compose logs kafka -``` - -You can configure the containers [logging driver](https://docs.docker.com/engine/admin/logging/overview/) using the `--log-driver` option if you wish to consume the container logs differently. In the default configuration docker uses the `json-file` driver. - -## Maintenance - -### Backing up your container - -To backup your data, configuration and logs, follow these simple steps: - -#### Step 1: Stop the currently running container - -```console -docker stop kafka -``` - -Or using Docker Compose: - -```console -docker-compose stop kafka -``` - -#### Step 2: Run the backup command - -We need to mount two volumes in a container we will use to create the backup: a directory on your host to store the backup in, and the volumes from the container we just stopped so we can access the data. - -```console -docker run --rm -v /path/to/kafka-backups:/backups --volumes-from kafka busybox \ - cp -a /bitnami/kafka /backups/latest -``` - -Or using Docker Compose: - -```console -docker run --rm -v /path/to/kafka-backups:/backups --volumes-from `docker-compose ps -q kafka` busybox \ - cp -a /bitnami/kafka /backups/latest -``` - -### Restoring a backup - -Restoring a backup is as simple as mounting the backup as volumes in the container. - -```console -docker run -v /path/to/kafka-backups/latest:/bitnami/kafka bitnami/kafka:latest -``` - -You can also modify the [`docker-compose.yml`](https://github.com/bitnami/containers/blob/main/bitnami/kafka/docker-compose.yml) file present in this repository: - -```yaml -kafka: - volumes: - - /path/to/kafka-backups/latest:/bitnami/kafka -``` +The Bitnami Apache Kafka Docker image sends the container logs to the `stdout`. You can configure the containers [logging driver](https://docs.docker.com/engine/admin/logging/overview/) using the `--log-driver` option if you wish to consume the container logs differently. In the default configuration docker uses the `json-file` driver. ## Notable Changes