Implementation:Apache Kafka Docker Registry Push
Appearance
| Knowledge Sources | |
|---|---|
| Domains | Release_Engineering, Containerization |
| Last Updated | 2026-02-09 12:00 GMT |
Overview
Concrete tool for pushing Docker images to a container registry provided by the Kafka docker_release module.
Description
The push to the container registry is integrated into the build_push function via the --push flag in the docker buildx build command. This flag instructs Buildx to push each platform-specific image and the multi-arch manifest to the configured registry immediately after building.
Usage
The push is automatic when using docker_release.py. Ensure docker login has been executed for the target registry before running.
Code Reference
Source Location
- Repository: Apache Kafka
- File: docker/docker_release.py
- Lines: L46
Signature
# Part of the buildx command in build_push():
docker buildx build \
-f $DOCKER_FILE \
--build-arg kafka_url={kafka_url} \
--build-arg build_date={date} \
--push \
--platform linux/amd64,linux/arm64 \
--tag {image} \
$DOCKER_DIR
Import
# Prerequisite: docker login
docker login
# Then run docker_release.py
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| image | str | Yes | Target registry/image:tag (e.g., apache/kafka:3.7.0) |
| Docker credentials | config | Yes | Pre-configured via docker login |
Outputs
| Name | Type | Description |
|---|---|---|
| Pushed image | registry | Multi-arch image available at the specified tag |
Usage Examples
# Login to Docker Hub
docker login
# Build and push release image
python docker/docker_release.py apache/kafka:3.7.0-rc0 \
-u https://dist.apache.org/repos/dist/dev/kafka/3.7.0-rc0/kafka_2.13-3.7.0.tgz
Related Pages
Implements Principle
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment