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 分钟前
容器化部署|Docker搭建Blinko轻量笔记系统
笔记·docker·容器
炸裂狸花猫2 小时前
开源身份认证与访问管理平台 - Keycloak(二)
docker·云原生·容器·kubernetes·开源·keycloak·sso
炸裂狸花猫2 小时前
开源身份认证与访问管理平台 - Keycloak(一)
docker·云原生·kubernetes·开源·devops
rustfs2 小时前
MinIO 国产平替,RustFS 发布 Beta 版本啦
分布式·docker·云原生·rust·开源
Hungry_Shark3 小时前
Windows上Docker安装失败:DockerDesktop must beowned by an elevated account
windows·docker
苏渡苇3 小时前
关于Docker镜像仓库
docker·镜像仓库·docker私有镜像仓库
流放深圳3 小时前
CentOS7 安装 Redis Stack
docker·redisstack
ai产品老杨3 小时前
深度架构解析:基于异构计算与 Docker 容器化的 AI 视频管理平台实战
人工智能·docker·架构
开开心心就好3 小时前
支持批量添加水印的实用工具推荐
人工智能·游戏·ci/cd·docker·音视频·语音识别·媒体
运维老司机4 小时前
Kafka 单节点部署(Docker Compose + 数据持久化)
分布式·docker·kafka