Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Implementation:Apache Kafka Docker Buildx Remove

From Leeroopedia


Knowledge Sources
Domains Release_Engineering, Containerization
Last Updated 2026-02-09 12:00 GMT

Overview

Concrete tool for removing the Docker Buildx builder instance provided by the Kafka docker_release module.

Description

The remove_builder function executes docker buildx rm kafka-builder to remove the named builder instance. It is called in the finally block of build_push to ensure cleanup.

Usage

Called automatically at the end of build_push. Not typically invoked directly.

Code Reference

Source Location

  • Repository: Apache Kafka
  • File: docker/docker_release.py
  • Lines: L56-57

Signature

def remove_builder():
    """Removes docker buildx builder named 'kafka-builder'."""
    execute(["docker", "buildx", "rm", "kafka-builder"])

Import

from common import execute

I/O Contract

Inputs

Name Type Required Description
(none) Uses hardcoded builder name "kafka-builder"

Outputs

Name Type Description
Builder removed void Builder instance and cache freed

Usage Examples

# In build_push:
try:
    create_builder()
    # ... build and push ...
finally:
    remove_builder()  # Always cleanup

Related Pages

Implements Principle

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment