[英]The command '/bin/sh -c apt-get update && apt-get upgrade' returned a non-zero code: 1
在尝试从 dockerfile 构建图像时,我确实收到了以下错误消息。 有什么建议么?
错误消息:命令“/bin/sh -c apt-get update && apt-get upgrade”返回非零代码:1
截图 [Dockerfile][1] [1]: https://i.stack.imgur.com/TXs9g.jpg [运行构建命令后][2] [2]: https://i.stack.imgur。 com/L29tu.jpg
从屏幕截图看来, apt-get upgrade
已中止。 要自动确认 apt-get 的Y/n
提示,您可以指定 -y 标志。
因此,将 Dockerfile 中的 RUN 行更改为apt-get update && apt-get -y upgrade
-y, --yes, --assume-yes
Automatic yes to prompts; assume "yes" as answer to all prompts and
run non-interactively. If an undesirable situation, such as
changing a held package, trying to install a unauthenticated
package or removing an essential package occurs then apt-get will
abort. Configuration Item: APT::Get::Assume-Yes.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.