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

相关推荐
雪可问春风19 小时前
docker环境部署
运维·docker·容器
双份浓缩馥芮白20 小时前
【Docker】Linux 迁移 docker 目录(软链接)
linux·docker
kobe_OKOK_21 小时前
S7 adapter Docker run
运维·docker·容器
一个欠登儿程序员21 小时前
在国产服务器上通过 Docker 部署 Windows 虚拟机
服务器·windows·docker
Hadoop_Liang1 天前
构建Spring Boot项目Docker镜像
spring boot·后端·docker
Learn-Python1 天前
修改docker容器内文件后让其生效
运维·docker·容器
Jackeyzhe1 天前
从零学习Kafka:位移与高水位
kafka
面向Google编程1 天前
从零学习Kafka:位移与高水位
大数据·后端·kafka
却话巴山夜雨时i1 天前
互联网大厂Java面试:从Spring到微服务的全栈挑战
java·spring boot·redis·微服务·面试·kafka·技术栈
赵丙双1 天前
docker restart 策略
docker·restart