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

相关推荐
漫无目的行走的月亮5 小时前
在Docker中运行微服务注册中心Eureka
docker
大道归简8 小时前
Docker 命令从入门到入门:从 Windows 到容器的完美类比
windows·docker·容器
zeruns8029 小时前
如何搭建自己的域名邮箱服务器?Poste.io邮箱服务器搭建教程,Linux+Docker搭建邮件服务器的教程
linux·运维·服务器·docker·网站
爱跑步的程序员~9 小时前
Docker
docker·容器
疯狂的大狗9 小时前
docker进入正在运行的容器,exit后的比较
运维·docker·容器
长天一色9 小时前
【Docker从入门到进阶】01.介绍 & 02.基础使用
运维·docker·容器
伊玛目的门徒10 小时前
docker 搭建minimalist-web-notepad
运维·docker·notepad
猿java12 小时前
使用 Kafka面临的挑战
java·后端·kafka
theo.wu12 小时前
使用Buildpacks构建Docker镜像
运维·docker·容器
路上^_^12 小时前
00_概览_kafka
分布式·kafka