在Dockerfile中执行dpkg-reconfigure wireshark-common

你如何做一个Dockerfile的dpkg-reconfigure wireshark-common

我的Docker文件包含: RUN apt-get install wireshark --yes

但是--yes并不影响dpkg-reconfigure wireshark-common step,所以对我来说不是很明显如何回答是或甚至否屏幕上的问题Should non-superusers be able to capture packets?

尝试使用yes命令。

 RUN yes | dpkg-reconfigure wireshark-common 

另一个你可以做的尝试是:

 RUN echo "y" | dpkg-reconfigure wireshark-common 

现在不知道什么是Wireshark要求在dpkg-reconfigure …但使用这种技术,你可以发送一个“Y”或“1”或任何你需要的。

另一个可能的解决scheme根据您的意见

 RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y wireshark 

最后一个,您将跳过任何交互式安装后configuration步骤。