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

相关推荐
网络小白不怕黑6 分钟前
Docker容器网络:从容器互联到跨主机通信
网络·docker·容器
Rysxt_14 分钟前
Docker Compose 启动与停止命令完全指南
docker·容器·docker compose
网络小白不怕黑36 分钟前
Docker Compose与私有仓库
运维·docker·容器
飞Link2 小时前
Linux下的Docker安装教程
linux·运维·服务器·docker·容器
Java陈序员2 小时前
一键部署!一款开源自托管的照片画廊神器!
vue.js·docker
技术破壁人2 小时前
Kafka 的自动提交机制详解:Spring Boot 中如何正确使用?
kafka
飞Link2 小时前
Docker基础知识
运维·docker·容器
回忆是昨天里的海2 小时前
docker存储-卷映射
运维·服务器·docker
凯子坚持 c2 小时前
Docker常见问题(多种类似命令之间的区别)
运维·docker·容器
FreeSoar13 小时前
linux 安装 docker报错处理
linux·运维·docker