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

相关推荐
火龙谷35 分钟前
【hadoop】Kafka 安装部署
大数据·hadoop·kafka
日月星宿~1 小时前
【kafka】基本命令
kafka
haven-8525 小时前
win11安装Joplin Server私有化部署(docker)
运维·docker·容器
QX_hao5 小时前
【docker】--数据卷挂载
docker·容器·eureka
文静小土豆5 小时前
在K8S集群中部署EFK日志收集
docker·容器·kubernetes
不之道6 小时前
通过 wsl 安装 docker
运维·docker·容器
ZHOU_WUYI7 小时前
Milvus Docker 部署教程
docker·容器·milvus
东方未明01088 小时前
docker(四)使用篇一:docker 镜像仓库
docker·容器·镜像仓库
fjkxyl9 小时前
Kafka消息路由分区机制深度解析:架构设计与实现原理
分布式·kafka
ChironW9 小时前
Ubuntu 22.04.5 LTS上部署Docker及相关优化
ubuntu·docker·容器