From bb168442209c37f7a54f9ec81d9933867ff4945b Mon Sep 17 00:00:00 2001 From: hailin Date: Tue, 23 Dec 2025 19:06:28 -0800 Subject: [PATCH] =?UTF-8?q?fix(docker):=20=E4=B8=BA=20zookeeper=20?= =?UTF-8?q?=E5=92=8C=20kafka=20=E6=8C=82=E8=BD=BD=E6=97=B6=E5=8C=BA?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit confluentinc 镜像不支持 TZ 环境变量,需要挂载宿主机时区文件: - /etc/localtime - /etc/timezone 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- backend/services/docker-compose.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/services/docker-compose.yml b/backend/services/docker-compose.yml index 38f84996..a4d6f31f 100644 --- a/backend/services/docker-compose.yml +++ b/backend/services/docker-compose.yml @@ -61,6 +61,9 @@ services: TZ: Asia/Shanghai ZOOKEEPER_CLIENT_PORT: 2181 ZOOKEEPER_TICK_TIME: 2000 + volumes: + - /etc/localtime:/etc/localtime:ro + - /etc/timezone:/etc/timezone:ro healthcheck: test: ["CMD", "nc", "-z", "localhost", "2181"] interval: 10s @@ -88,6 +91,9 @@ services: KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true" + volumes: + - /etc/localtime:/etc/localtime:ro + - /etc/timezone:/etc/timezone:ro healthcheck: test: ["CMD", "kafka-topics", "--bootstrap-server", "localhost:9092", "--list"] interval: 30s