version: '2' services: kafka: container_name: kafka image: confluentinc/cp-kafka:7.5.2 ports: - 9092:9092 environment: CLUSTER_ID: kafka-docker-cluster-1 KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 KAFKA_PROCESS_ROLES: broker,controller KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER KAFKA_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093 KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://127.0.0.1:9092 KAFKA_BROKER_ID: 1 KAFKA_CONTROLLER_QUORUM_VOTERS: 1@127.0.0.1:9093 ALLOW_PLAINTEXT_LISTENER: 'yes' KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true' KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1 KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1 KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: "true" KAFKA_AUTHORIZER_CLASS_NAME: org.apache.kafka.metadata.authorizer.StandardAuthorizer