【问题标题】:Permission denied while deploying/activating docker image in Rancher-Kubernetes在 Rancher-Kubernetes 中部署/激活 docker 映像时权限被拒绝
【发布时间】:2018-09-12 20:42:41
【问题描述】:

我正在 Rancher-Kubernetes 上部署 hyperledger/fabric-couchdb docker 镜像。在集群中,不允许将容器作为 ROOT 运行。所以我们需要在部署镜像时选择为 Nonroot。

部署 hyperledger/fabric-couchdb 后,Pod 没有启动。当我检查日志时,消息是 su-exec: setgroups: Operation not allowed。在下图中,我还附上了 Event 的屏幕截图。请建议需要做什么才能使其正常工作,或者我在这里做错了什么。

Event screenshot

【问题讨论】:

    标签: docker kubernetes hyperledger-fabric hyperledger rancher


    【解决方案1】:

    这就是问题所在,您没有以“root”身份运行,并且容器入口点执行了对setgroups 的调用,这需要“root”。您将不得不以某种方式以“root”身份运行,或者您可以修改容器映像和入口点,以便在需要“root”的情况下使用“sudo”之类的方法进行调用。

    请注意,任何调用“sudo”的用户都需要具有类似“root”的权限才能执行setgroups

    【讨论】:

      猜你喜欢
      • 2019-02-28
      • 2023-01-26
      • 2018-01-15
      • 1970-01-01
      • 2020-09-16
      • 2020-07-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多