add wireshark
This commit is contained in:
parent
d249f6b0a6
commit
27f89d7ed6
32
wireshark/Dockerfile
Normal file
32
wireshark/Dockerfile
Normal file
@ -0,0 +1,32 @@
|
||||
# Run Wireshark in a container
|
||||
FROM ubuntu:xenial
|
||||
MAINTAINER Andrey Arapov <andrey.arapov@nixaid.com>
|
||||
|
||||
# To avoid problems with Dialog and curses wizards
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get -y --no-install-recommends install \
|
||||
ca-certificates wireshark && \
|
||||
rm -rf -- /var/lib/apt/lists
|
||||
|
||||
ENV USER user
|
||||
ENV UID 1000
|
||||
ENV HOME /home/$USER
|
||||
|
||||
ENV LC_ALL C.UTF-8
|
||||
|
||||
RUN useradd -u $UID -m -d $HOME -s /usr/sbin/nologin $USER
|
||||
|
||||
# Allow a non-privileged user to use the wireshark
|
||||
# https://wiki.wireshark.org/CaptureSetup/CapturePrivileges
|
||||
RUN setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/dumpcap
|
||||
|
||||
USER $USER
|
||||
WORKDIR $HOME
|
||||
ENTRYPOINT [ "wireshark" ]
|
||||
|
||||
# Just an alternative way to start wireshark
|
||||
# RUN echo "$USER ALL=NOPASSWD:SETENV:/usr/bin/wireshark" | tee /etc/sudoers.d/$USER
|
||||
# ENTRYPOINT [ "sudo", "-E", "wireshark" ]
|
||||
# xhost +; wireshark; xhost -
|
16
wireshark/docker-compose.yml
Normal file
16
wireshark/docker-compose.yml
Normal file
@ -0,0 +1,16 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
wireshark:
|
||||
image: andrey01/wireshark
|
||||
network_mode: host
|
||||
volumes:
|
||||
- /tmp/.X11-unix:/tmp/.X11-unix:ro
|
||||
- $HOME/Downloads:/home/user/Downloads:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
environment:
|
||||
- DISPLAY=unix$DISPLAY
|
||||
# https://forum.qt.io/topic/55144/qxcbconnection-xcb-error-qwarning
|
||||
- QT_DEVICE_PIXEL_RATIO=2
|
||||
cap_add:
|
||||
- NET_ADMIN
|
Loading…
Reference in New Issue
Block a user