Openshift 上的 Fluentd 容器不是 运行

Fluentd container not running on Openshift

我正在尝试 运行 Openshift 上的流畅图像。我正在使用来自 Docker Hub 的 Fluentd 官方图像。

但是,我收到以下错误 -

adduser: permission denied (are you root?)
chown: unknown user fluent
chown: unknown user fluent
su-exec: setgroups(0): Operation not permitted

我认为这是因为 Fluentd 容器想要 运行 作为 root,而 Openshift 不允许想要 运行 作为 root 的容器。

有人知道我该如何解决这个问题吗? 运行 Fluentd 容器作为非 root 用户?在此先感谢您的帮助。

repo 的 URL 是 - https://hub.docker.com/r/fluent/fluentd/

我们在项目中遇到了同样的问题。我们解决了这个基于 fluentd-onbuild 图像构建自定义 fluentd 容器的问题,该图像旨在自定义基本 fluentd 容器。 Dockerfile 位于此处:

https://github.com/Gepardec/Hogarama/blob/master/Fluentd/Dockerfile

https://github.com/Gepardec/Hogarama/blob/0f91618c37493ef70eb5d83bcec3bd258edc29c3/Fluentd/Dockerfile

该项目还包含 openshift 模板,其中可能包含一些片段,您可以使用它来适应您的需要:

https://github.com/Gepardec/Hogarama/tree/master/Templates

https://github.com/Gepardec/Hogarama/tree/0f91618c37493ef70eb5d83bcec3bd258edc29c3/Templates