命令'/bin/sh-c apt-get install dnsutils'返回非零代码:1 [英] The command '/bin/sh -c apt-get install dnsutils' returned a non-zero code: 1

查看:41
本文介绍了命令'/bin/sh-c apt-get install dnsutils'返回非零代码:1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正在尝试在停靠生成期间安装dnsutils。

Dockerfile:

# Dockerfile - this is a comment. Delete me if you want.

FROM python:2.7

COPY . /app

WORKDIR /app

RUN pip install -r requirements.txt

RUN apt-get update

RUN apt-get install dnsutils

CMD ["python","unitTest.py"]

输出:

Do you want to continue? [Y/n] Abort.

The command `/bin/sh -c apt-get install dnsutils` returned a non-zero code: 1

如何才能在镜像中安装挖洞而不出现上述错误?

推荐答案

添加-y以自动接受&;保持非交互-

RUN apt-get install -y dnsutils

这篇关于命令'/bin/sh-c apt-get install dnsutils'返回非零代码:1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆