我想用Dockerfile在Docker for Mac上的ubuntu17.04上安装tshark。 我正在使用docker-compose
在runtime
中,有以下提示
尽管我键入了apt install tshark
,但提示停止安装。
如何在Dockerfile中安装tshark?
yes
答案 0 :(得分:3)
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y tshark
无需用户互动即可安装。
答案 1 :(得分:0)
首先,您通常(避免输入'是'):
RUN apt install -yq xxx
第二
安装命令变为最后一种情况:
# Install build wireshark, need to run as root RUN apt-get update && \
apt-get install -y wireshark && \
groupadd wireshark && \
usermod -aG wireshark developer && \
setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/dumpcap && \
chgrp wireshark /usr/bin/dumpcap && \
chmod 750 /usr/bin/dumpcap