Kafka 笔记 (Non-Root/Container)

目录

  • [1. Kafka 笔记 (Non-Root/Container)](#1. Kafka 笔记 (Non-Root/Container))
    • [1.1. 启动](#1.1. 启动)
    • [1.2. bitnami/kafka](#1.2. bitnami/kafka)
      • [1.2.1. Non-Root Containers](#1.2.1. Non-Root Containers)

1. Kafka 笔记 (Non-Root/Container)

1.1. 启动

Kafka 需要与 ZooKeeper 一起启动:

Kafka with ZooKeeper

Run the following commands in order to start all services in the correct order:

sh 复制代码
# Start the ZooKeeper service
bin/zkServer.sh start

Open another terminal session and run:

sh 复制代码
# Start the Kafka broker service
bin/kafka-server-start.sh config/server.properties

Once all services have successfully launched, you will have a basic Kafka environment running and ready to use.

1.2. bitnami/kafka

1.2.1. Non-Root Containers

Work With Non-Root Containers for Bitnami Applications

这是一种没有 root 用户的容器 (默认没开启)。

开启方法: Using Non-Root Containers as Root Containers

If you wish to run a Bitnami non-root container image as a root container image, you can do so by adding the line user: root right after the image: directive in the container's docker-compose.yml. After making this change, simply restart the container and it will run as the root user with all privileges instead of an unprivileged user.

docker-compose.yml 文件里面的 image: 行下再加一行: user: root

相关推荐
随便做点啥3 小时前
32卡-64G-910B4-16后端-(Qwen3.8-27B-W8A8)集群部署报告
运维·服务器·经验分享·docker·vllm
Orange_sparkle12 小时前
从 Docker 到 Doris:建立后端基础设施全景图
运维·docker·ai·容器·claude code
gx234814 小时前
控制器管理
docker·容器·kubernetes
白清羽15 小时前
7.3系统安装docker
运维·docker·容器
dazhong201217 小时前
Docker 入门篇(八)-- CentOS7 安装 MySQL 8
mysql·docker·容器
典典分享指南19 小时前
用大模型把写作 SOP 变成可复用 Prompt
docker·jupyter·eclipse·phpstorm·myeclipse
Larru-Sun1 天前
从零开始用 Docker 部署 Node.js 后端服务
docker·容器·node.js
2601_962064701 天前
SpringBoot 整合 Avro 与 Kafka
spring boot·kafka·linq
feilieren1 天前
ubuntu 安装 docker
linux·ubuntu·docker
judezh1 天前
一个 Agent 平台要起 12 个容器,做演示能砍到几个?
docker