How to install tshark on Docker? How to install tshark on Docker? docker docker

How to install tshark on Docker?


RUN DEBIAN_FRONTEND=noninteractive apt-get install -y tshark

Will install without needing user interaction.


First, you generally have (to avoid having to type 'yes'):

RUN apt install -yq xxx

Second:

  • you can check out this tshark image, which does install dumcap; by compiling wireshark, which produced dumpcap.
  • the alternative (no compilation, only install) is this image

The install command becomes in that last case:

# 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