Status

Current state: Under Discussion

Discussion thread: here [Not started]

JIRA: here

Motivation

This KIP aims to introduce Docker Official Image (DOI) for Apache Kafka, ensuring the Kafka Docker images adhere to Docker's quality standards.

Several other Apache projects, like Flink, Spark, Solr, have already released Docker Official Images, with download figures ranging from 50 million to over 1 billion. These numbers highlight the significant demand among users. Also the Docker Official Images are always the top 1 search result, irrespective of the number of downloads. This visibility guarantees that over time, a larger number of users will opt for Docker images provided by the Apache Kafka community. The support from these Apache projects indicates that we can achieve similar success with Apache Kafka.

Post-support, the Dockerfile for Apache Kafka will continue to be managed by the Apache Kafka community and undergo review by Docker. The Docker community will oversee the images' maintenance, aligning them with Docker's quality standards. Adopting this approach, means that the build and release process for the official Docker image will be managed by Docker Hub, eliminating any extra maintenance burden for the Apache Kafka community.


Public Interfaces

Proposed Changes

Compatibility, Deprecation, and Migration Plan

Making the Dockerfile Compliant

Proposed Workflow for Release Process

  1. Initial Setup:

  2. Release Candidate (RC) Preparation:

  3. Docker Image Preparation via GitHub Actions:

  4. Review and Integration:

  5. Docker Build and Release Testing:

  6. Iterative RC Updates:

  7. Final Release Promotion:

  8. Post-Release Maintenance:

  9. Docker Hub Submission:

Directory Structure

A new directory named docker_official_images will be added to the /docker repository. This directory will contain all the Official Docker Images related code.

kafka/
    - docker/
        - docker_official_images/ #Contains resources needed to create the official docker images.
            - 3.7.2-rc/           #Contains resources needed to create the docker images for the latest RC tag for the 3.7.2 version. 
              - jvm/              #Contains Dockerfile for the JVM-based Apache Kafka Docker image.
                - Dockerfile + necessary scripts 
            - 3.7.1/              #Contains resources needed to create the official docker images for the 3.7.1 version.
              - jvm/              #Contains Dockerfile for the JVM-based Apache Kafka Official Docker image.
                - Dockerfile + necessary scripts
            - 3.7.0.              #Contains resources needed to create the official docker images for the 3.7.0 version.
              - jvm/              #Contains Dockerfile for the JVM-based Apache Kafka Official Docker image.
                - Dockerfile + necessary scripts
            - 3.6.5/
              - jvm/
                - Dockerfile + necessary scripts
        - jvm/
            - Dockerfile          #Dockerfile for the JVM-based Apache Kafka Docker image.
        - resources/              #Contains resources needed to create the Docker image.
        - test/                   #Contains sanity tests for the Docker image.
        - docker_build_test.py    #Python script for building and testing the Docker image.
        - docker_release.py       #Python script for building the Docker image and pushing it to Docker Hub.
        - docker_build_latest_artifact.py #Python script for building the artifact for the current RC release.


Test Plan

Existing tests for docker image should pass.

Rejected Alternatives

Creating a separate repository named apache-docker within the Apache GitHub organization.This strategy mirrors the practices of other Apache projects, such as Spark and Flink, where Docker-related files and scripts reside in a distinct repository. However, this move would involve transferring existing Docker resources to the new repository too, without providing any added advantage. This approach does not provide any benefit in the requirement for creating specific folders with hardcoded values for each Docker image release.