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

相关推荐
2401_897930062 小时前
linux系统如何配置host.docker.internal
linux·docker·eureka
亲持红叶6 小时前
open-webui安装
docker·open-webui
伪装成塔的小兵7 小时前
Windows使用docker部署fastgpt出现的一些问题
windows·docker·容器·oneapi·fastgpt
茶本无香10 小时前
kafka+spring cloud stream 发送接收消息
spring cloud·kafka·java-zookeeper
转身後 默落10 小时前
11.Docker 之分布式仓库 Harbor
分布式·docker·容器
菩提云11 小时前
Deepseek存算分离安全部署手册
人工智能·深度学习·安全·docker·容器
c无序17 小时前
Docker-技术架构演进之路
docker
努力的小T21 小时前
使用 Docker 部署 Apache Spark 集群教程
linux·运维·服务器·docker·容器·spark·云计算
东风微鸣1 天前
TTRSS 迁移实战
docker·云原生·kubernetes·可观察性
xiao-xiang1 天前
kafka-保姆级配置说明(producer)
分布式·kafka