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

相关推荐
费曼乐园23 分钟前
Kafka与ZooKeeper
zookeeper·kafka
心惠天意40 分钟前
docker-compose篇---创建jupyter并可用sudo的创建方式
docker·jupyter·容器
huaweichenai2 小时前
windows下修改docker的镜像存储地址
运维·docker·容器
菠萝炒饭pineapple-boss2 小时前
Dockerfile另一种使用普通用户启动的方式
linux·docker·dockerfile
前端 贾公子3 小时前
速通Docker === 网络
docker
小白的一叶扁舟4 小时前
Kafka 入门与应用实战:吞吐量优化与与 RabbitMQ、RocketMQ 的对比
java·spring boot·kafka·rabbitmq·rocketmq
霍格沃兹测试开发学社测试人社区4 小时前
软件测试丨消息管道(Kafka)测试体系
软件测试·分布式·测试开发·kafka
昵称难产中5 小时前
浅谈云计算21 | Docker容器技术
docker·容器·云计算
weisian1515 小时前
消息队列篇--原理篇--RocketMQ和Kafka对比分析
分布式·kafka·rocketmq
旦沐已成舟10 小时前
K8S-Pod的环境变量,重启策略,数据持久化,资源限制
java·docker·kubernetes