​
DirectorySecurity Advisories
Sign In
Directory
kafka logo

kafka

Last changed

Get Started with Latest for Free
docker pull cgr.dev/chainguard/kafka

Need access to a specific version? Contact us.

Sign In for Updates

Get notified of upcoming product changes, critical vulnerability notifications and patches and more.

Sign In
Versions
Overview
Provenance
Specifications
SBOM
Vulnerabilities
Advisories

Chainguard Image for kafka

Minimal image with Kafka.

Chainguard Images are regularly-updated, minimal container images with low-to-zero CVEs.

Download this Image

This image is available on cgr.dev:

docker pull cgr.dev/ORGANIZATION/kafka:latest

Be sure to replace the ORGANIZATION placeholder with the name used for your organization's private repository within the Chainguard registry.

Using KAFKA

Chainguard Kafka images include the kafka-server-* scripts which can be used to start up or configure Kafka or it's dependencies. The full list of scripts is available here:

% docker run -it --entrypoint=sh cgr.dev/chainguard/kafka
/ #
/ # ls /usr/lib/kafka/bin/
connect-distributed.sh              kafka-console-producer.sh           kafka-leader-election.sh            kafka-run-class.sh                  kafka-verifiable-producer.sh
connect-mirror-maker.sh             kafka-consumer-groups.sh            kafka-log-dirs.sh                   kafka-server-start.sh               trogdor.sh
connect-standalone.sh               kafka-consumer-perf-test.sh         kafka-metadata-quorum.sh            kafka-server-stop.sh                windows
kafka-acls.sh                       kafka-delegation-tokens.sh          kafka-metadata-shell.sh             kafka-storage.sh                    zookeeper-security-migration.sh
kafka-broker-api-versions.sh        kafka-delete-records.sh             kafka-mirror-maker.sh               kafka-streams-application-reset.sh  zookeeper-server-start.sh
kafka-cluster.sh                    kafka-dump-log.sh                   kafka-producer-perf-test.sh         kafka-topics.sh                     zookeeper-server-stop.sh
kafka-configs.sh                    kafka-features.sh                   kafka-reassign-partitions.sh        kafka-transactions.sh               zookeeper-shell.sh
kafka-console-consumer.sh           kafka-get-offsets.sh                kafka-replica-verification.sh       kafka-verifiable-consumer.sh

The default entrypoint is set to run the kafka-server-start.sh script with a sample configuration at /usr/lib/kafka/config/server.properties. This can be overridden with the cmd of the container.

NOTE: You will need to separately configure a Zookeeper instance to start and run Kafka. You can use the Chainguard Image for Zookeeper, or another Zookeeper service.

Here's a non-production-grade quickstart to try it out locally in a single container:

$ /usr/lib/kafka/bin/zookeeper-server-start.sh /usr/lib/kafka/config/zookeeper.properties &

$ /usr/lib/kafka/bin/kafka-server-start.sh /usr/lib/kafka/config/server.properties
[2023-03-18 00:10:17,335] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$)
[2023-03-18 00:10:17,475] INFO Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation (org.apache.zookeeper.common.X509Util)
[2023-03-18 00:10:17,525] INFO Registered signal handlers for TERM, INT, HUP (org.apache.kafka.common.utils.LoggingSignalHandler)
[2023-03-18 00:10:17,526] INFO starting (kafka.server.KafkaServer)
[2023-03-18 00:10:17,526] INFO Connecting to zookeeper on localhost:2181 (kafka.server.KafkaServer)
[2023-03-18 00:10:17,534] INFO [ZooKeeperClient Kafka server] Initializing a new session to localhost:2181. (kafka.zookeeper.ZooKeeperClient)
[2023-03-18 00:10:17,536] INFO Client environment:zookeeper.version=3.6.3--6401e4ad2087061bc6b9f80dec2d69f2e3c8660a, built on 04/08/2021 16:35 GMT (org.apache.zookeeper.ZooKeeper)
[2023-03-18 00:10:17,536] INFO Client environment:host.name=3848d9fbe7d6 (org.apache.zookeeper.ZooKeeper)
[2023-03-18 00:10:17,536] INFO Client environment:java.version=11.0.18-internal (org.apache.zookeeper.ZooKeeper)
[2023-03-18 00:10:17,536] INFO Client environment:java.vendor=wolfi (org.apache.zookeeper.ZooKeeper)
[2023-03-18 00:10:17,536] INFO Client environment:java.home=/usr/lib/jvm/openjdk-jre (org.apache.zookeeper.ZooKeeper)
...

Contact Support

If you have a Zendesk account (typically set up for you by your Customer Success Manager) you can reach out to Chainguard's Customer Success team through our Zendesk portal.

What are Chainguard Images?

Chainguard Images are a collection of container images designed for security and minimalism.

Many Chainguard Images are distroless; they contain only an open-source application and its runtime dependencies. These images do not even contain a shell or package manager. Chainguard Images are built with Wolfi, our Linux undistro designed to produce container images that meet the requirements of a secure software supply chain.

The main features of Chainguard Images include:

-dev Variants

As mentioned previously, Chainguard’s distroless Images have no shell or package manager by default. This is great for security, but sometimes you need these things, especially in builder images. For those cases, most (but not all) Chainguard Images come paired with a -dev variant which does include a shell and package manager.

Although the -dev image variants have similar security features as their distroless versions, such as complete SBOMs and signatures, they feature additional software that is typically not necessary in production environments. The general recommendation is to use the -dev variants only to build the application and then copy all application artifacts into a distroless image, which will result in a final container image that has a minimal attack surface and won’t allow package installations or logins.

That being said, it’s worth noting that -dev variants of Chainguard Images are completely fine to run in production environments. After all, the -dev variants are still more secure than many popular container images based on fully-featured operating systems such as Debian and Ubuntu since they carry less software, follow a more frequent patch cadence, and offer attestations for what they include.

Learn More

To better understand how to work with Chainguard Images, we encourage you to visit Chainguard Academy, our documentation and education platform.

Licenses

Chainguard Images contain software packages that are direct or transitive dependencies. The following licenses were found in the "latest" version of this image:

  • Apache-2.0

  • BSD-3-Clause

  • FTL

  • GPL-2.0-only

  • GPL-2.0-or-later

  • GPL-3.0-or-later

  • LGPL-2.1-or-later

For a complete list of licenses, please refer to this Image's SBOM.

Software license agreement

Category
AI
analytics
application

Media KitContact Us
© 2024 Chainguard. All Rights Reserved.
Private PolicyTerms of Use

Product

Chainguard Images