gpt4 book ai didi

docker -/bin/sh : service: command not found on cent os 7

转载 作者:行者123 更新时间:2023-12-04 19:30:34 29 4
gpt4 key购买 nike

在 Dockerfile 中构建此命令时:

RUN service start newrelic-infra

我收到这个错误:

/bin/sh: service: command not found The command '/bin/sh -c service start newrelic-infra' returned a non-zero code: 127

在 Dockerfile 中插入 yum -y install initscripts && yum clean all 并执行 RUN service start newrelic-infra 后,我遇到了同样的错误。

最佳答案

您可能需要使用以下内容:

RUN yum update -y && yum install initscripts -y

至少这对我有用。此外,还有一个 Github 问题,其中包含更多可能有帮助的信息: https://github.com/CentOS/sig-cloud-instance-images/issues/28

关于docker -/bin/sh : service: command not found on cent os 7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54961286/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com