diff --git a/Others/wireshark/4.4.6/24.03-lts-sp1/Dockerfile b/Others/wireshark/4.4.6/24.03-lts-sp1/Dockerfile index c5945bb504ba6a53a6ece91e6523b6df5714c986..c6a06ba7313f7ec091e833cd09918bf4f93d63cc 100644 --- a/Others/wireshark/4.4.6/24.03-lts-sp1/Dockerfile +++ b/Others/wireshark/4.4.6/24.03-lts-sp1/Dockerfile @@ -5,16 +5,27 @@ ARG VERSION=4.4.6 RUN dnf update -y \ && dnf install -y wget maven gcc-c++ cmake glib2-devel c-ares-devel libgcrypt-devel \ qt6-qtbase-devel qt6-qtdeclarative-devel qt6-qttools-devel \ - qt6-qt5compat-devel speexdsp-devel xz flex \ + qt6-qt5compat-devel speexdsp-devel xz flex libpcap-devel libcap \ && dnf clean all \ && rm -rf /var/cache/dnf RUN wget https://www.wireshark.org/download/src/wireshark-${VERSION}.tar.xz \ && tar -xf wireshark-${VERSION}.tar.xz \ + && rm -f wireshark-${VERSION}.tar.xz \ && cd wireshark-${VERSION} \ && mkdir build \ && cd build \ - && cmake .. \ - && make install + && cmake .. -DBUILD_wireshark=OFF -DBUILD_tshark=ON -DENABLE_CAP=ON \ + && make install \ + && cd ../../ \ + && rm -rf wireshark-${VERSION} -CMD ["/usr/local/bin/wireshark", "--help"] \ No newline at end of file +RUN groupadd -r wireshark && useradd -r -g wireshark wireshark + +RUN chgrp wireshark /usr/local/bin/dumpcap \ + && chmod 750 /usr/local/bin/dumpcap \ + && setcap cap_net_raw,cap_net_admin=eip /usr/local/bin/dumpcap + +USER wireshark + +CMD ["tshark", "--help"] \ No newline at end of file diff --git a/Others/wireshark/README.md b/Others/wireshark/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9f85711e7ea8203adfe87d7ac43890710c7d7c20 --- /dev/null +++ b/Others/wireshark/README.md @@ -0,0 +1,57 @@ +# Quick reference + +- The official wireshark docker image. + +- Maintained by: [openEuler CloudNative SIG](https://gitee.com/openeuler/cloudnative). + +- Where to get help: [openEuler CloudNative SIG](https://gitee.com/openeuler/cloudnative), [openEuler](https://gitee.com/openeuler/community). + +# wireshark | openEuler +Current wireshark docker images are built on the [openEuler](https://repo.openeuler.org/). This repository is free to use and exempted from per-user rate limits. + +Wireshark is a network traffic analyzer, or "sniffer", for Linux, macOS, +*BSD and other Unix and Unix-like operating systems and for Windows. +It uses Qt, a graphical user interface library, and libpcap and npcap as +packet capture and filtering libraries. + +Learn more about wireshark on [wireshark Website](https://www.wireshark.org/)⁠. + +# Supported tags and respective Dockerfile links +The tag of each `wireshark` docker image is consist of the version of `wireshark` and the version of basic image. The details are as follows + +| Tag | Currently | Architectures | +|----------|-------------|------------------| +|[4.4.6-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Others/wireshark/4.4.6/24.03-lts-sp1/Dockerfile)| wireshark 4.4.6 on openEuler 24.03-LTS-SP1 | amd64, arm64 | + +# Usage +In this usage, users can select the corresponding `{Tag}` based on their requirements. + +- Pull the `openeuler/wireshark` image from docker + + ```bash + docker pull openeuler/wireshark:{Tag} + ``` + +- Run with an interactive shell + + You can also start the container with an interactive shell to use wireshark. Additionally, you can run `tshark --help` learn how to use its commands. + ``` + docker run -it --rm openeuler/wireshark:{Tag} bash + ``` + +- List available interfaces + + This command lists all network interfaces on the system that `tshark` can capture packets from. + ``` + tshark -D + ``` + +- Capture packets on a specific interface + + To write the capture packets to a `.pcap` file. + ``` + tshark -i xxx -w capture_output.pcap + ``` + +# Question and answering +If you have any questions or want to use some special features, please submit an issue or a pull request on [openeuler-docker-images](https://gitee.com/openeuler/openeuler-docker-images). \ No newline at end of file diff --git a/Others/wireshark/doc/image-info.yml b/Others/wireshark/doc/image-info.yml new file mode 100644 index 0000000000000000000000000000000000000000..116f01e525c0e6547f15fe18694a99dd5e9cddd9 --- /dev/null +++ b/Others/wireshark/doc/image-info.yml @@ -0,0 +1,51 @@ +name: wireshark +category: others +description: Wireshark 是一款功能强大的 网络协议分析工具,广泛用于网络故障排查、安全分析、软件调试、学习网络协议等场景。 +environment: | + 本应用在Docker环境中运行,安装Docker执行如下命令 + ``` + yum install -y docker + ``` +tags: | + wireshark镜像的Tag由其版本信息和基础镜像版本信息组成,详细内容如下 + + | Tag | Currently | Architectures | + |----------|-------------|------------------| + |[4.4.6-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Others/wireshark/4.4.6/24.03-lts-sp1/Dockerfile)| wireshark 4.4.6 on openEuler 24.03-LTS-SP1 | amd64, arm64 | + +download: | + 拉取镜像到本地 + ``` + docker pull openeuler/wireshark:{Tag} + ``` + +usage: | + - 以交互式Shell运行容器: + + 通过交互式 Shell 启动容器,使用wireshark: + ``` + docker run -it --rm openeuler/wireshark:{Tag} bash + ``` + + - 列出可用的网络接口 + + 此命令会列出系统中所有可用于抓包的网络接口 + ``` + tshark -D + ``` + + - 在指定接口上抓包 + + 使用此命令可以在指定的网络接口`xxx`上抓包,并将抓到的包写入一个 .pcap 文件中 + ``` + tshark -i xxx -w capture_output.pcap + ``` + 此外,也可以运行 tshark --help 更详细的了解如何使用其他命令。 + +license: GPL v2 +similar_packages: + - tcpdump: 命令行抓包工具,轻量、速度快,适合服务器环境。 +dependency: + - libpcap + - Qt6 + - dumpcap diff --git a/Others/wireshark/doc/picture/logo.png b/Others/wireshark/doc/picture/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..61e2f36fc84a5f10e65d1e8340e3577ae548677c Binary files /dev/null and b/Others/wireshark/doc/picture/logo.png differ