Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Current state:  Under Discussion

Discussion thread: here

Voting thread: here

JIRA: KAFKA-15444

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

...

Native binaries operate independently and do not require specific packages to run. Consequently, opting for the most minimal base images will enable us to produce compact Docker images.
We propose to make use of alpine image as the base image.

Though alpine images are light weight and will help in decreasing the size of the resultant docker image, it comes with its own set of drawbacks

While Alpine images offer a lightweight solution, contributing to a smaller Docker image size, there are certain considerations to bear in mind

  • Alpine It uses musl libc, though but for native image to runcompatibility, we would like to have glibc. This problem will be countered by installing require glibc. To address this, we'll need to install gcompat.
  • It Alpine uses old an older shell instead of bash, necessitating the installation of bash . That too will have to be installed.It makes use of a relatively unpopular package manager apk . There is a possibility, in future, if we need some libraries, they may not be supported by apkto run our helper scripts.
  • Alpine employs the apk package manager, which, being relatively less popular, may pose challenges in the future. There's a potential risk that certain libraries we might need could lack support from apk.

Alpine vs Ubuntu Docker Base Image

The next best option I explored is the Ubuntu Docker image( https://hub.docker.com/_/ubuntu/tags) which is a more complete image.

  • Size: It has a size of 70MB compared to the 15MB of the Alpine image (post-installation of glibc and bash), resulting in a difference of 55MB.
  • Performance: I executed produce/consume performance scripts on the Kafka native Docker image using both Alpine and Ubuntu, and the results indicated comparable performance between the two.

Image Naming

Image naming should:

...