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

相关推荐
小和尚同志4 小时前
26.4k Star 的开源自托管仪表盘,关注你想关注的一切
docker·容器·开源
Franciz小测测4 小时前
proxmox 解决docker容器MongoDB创建报错MongoDB 5.0+ requires a CPU with AVX support
运维·docker·容器
鹿先森AI探索之路7 小时前
Windows11 本地安装docker Desktop 部署dify 拉取镜像报错
运维·docker·容器
不辉放弃8 小时前
kafka的shell操作
数据库·kafka·pyspark·大数据开发
都叫我大帅哥8 小时前
Docker Compose:让多容器应用一键起飞 🚀
docker
<花开花落>10 小时前
解决 WSL 中无法访问 registry-1.docker.io/v2/,无法用 docker 拉取 image
docker
黑心的奥利奥12 小时前
Docker配置Gitlab-runner实现自动化容器化部署前端项目
docker·自动化·gitlab
Spring-wind13 小时前
【docker】将已有mysql脚本导入镜像内使用
mysql·docker·容器
LiberInfo15 小时前
MongoDB 副本集搭建与 Monstache 实时同步 Elasticsearch 全流程教程
数据库·mongodb·elasticsearch·搜索引擎·docker·kibana·monstache
Java陈序员15 小时前
告别命令行!一个开源的 Docker 容器可视化管理工具!
docker·容器·go