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

相关推荐
golang学习记21 小时前
Go 项目使用docker compose的正确方式
开发语言·docker·golang
wear工程师1 天前
Kafka 消费者心跳正常,为什么还会被踢出组?拆清 max.poll.interval.ms
java·kafka
雨声不在1 天前
私有 Docker Registry 排障实录:两个隐蔽的坑
docker·容器
读书读傻了哟1 天前
解决docker拉取镜像报错failed to resolve reference “docker.io/xxx“...i/o timeout问题
运维·docker·容器
Ai拆代码的曹操1 天前
DaemonSet OnDelete 策略详解:为何 rollout restart 无效及正确迁移方案
docker·容器·kubernetes
瑞码空间1 天前
Web应用的多端部署之道:浏览器 · Electron · Docker
前端·docker·electron·浏览器·web
badhope1 天前
Docker镜像从2GB压到80MB——我被运维追着打了三天才学会的容器瘦身术
docker
x²+(y-√³x²)²=11 天前
参数 `-v /usr/local/Ascend/add-ons:/usr/local/Ascend/add-ons:ro` 的作用
linux·docker
wangjing_05221 天前
通过CentOS 7虚拟机的Docker服务部署Node-RED及气象数据显示界面搭建完整教程
linux·docker·centos
Patrick在香港2 天前
Python Docker镜像从1.2GB到89MB:多阶段构建的完整优化实录
java·python·docker·信息可视化·容器·数据分析·ai编程