...
 
Commits (4)
......@@ -33,3 +33,8 @@ ftkimager:latest:
script:
- cd ftkimager
- bash ./build latest
wireshark:latest:
script:
- cd wireshark
- bash ./build latest
......@@ -8,8 +8,6 @@ docker run --rm -it \
-c 4 \
-m 4096M \
-v /etc/localtime:/etc/localtime:ro \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e "DISPLAY=unix${DISPLAY}" \
-v /dev/shm:/dev/shm \
-v "$(pwd):/data" \
--name ftkimager \
......
# Run wireshark in a container
FROM fedora:rawhide
LABEL maintainer "djds djds@ccs.neu.edu"
RUN dnf upgrade -y \
&& dnf install -y \
wireshark \
google-noto-sans-fonts \
google-noto-serif-fonts \
mesa-dri-drivers mesa-libGL
ARG GID
ARG ID
ARG AUDIO
RUN groupdel dialout \
&& groupmod -g "${AUDIO}" audio \
&& useradd -m -g wireshark -G audio,video -u "${ID}" wireshark \
&& mkdir -p /home/wireshark/data \
&& chown -R wireshark:wireshark /home/wireshark \
&& rm -rf /var/cache/dnf/*
WORKDIR /home/wireshark/data
# Run as non privileged user
USER wireshark
ENTRYPOINT ["/usr/bin/wireshark"]
#!/bin/bash
set -euo pipefail
REGISTRY="${REGISTRY:-}"
user='djds'
repo='wireshark'
tag=${1:-latest}
# set environment vars
GID="${GID:-$(id -g)}"
AUDIO="${AUDIO:-$(getent group audio | cut -d ':' -f 3)}"
ID="${ID:-$(id -u)}"
# build the container:
docker build \
--build-arg GID="${GID}" \
--build-arg ID="${ID}" \
--build-arg AUDIO="${AUDIO}" \
-t "${REGISTRY}${user}/${repo}:${tag}" .
if [[ "${PUSH:-}" == "true" ]]; then
docker push "${REGISTRY}${user}/${repo}:${tag}"
fi
# clean up our host environment
unset {GID,ID,AUDIO}
#!/bin/bash
# Use djds/wireshark:latest by default
tag="${1:-latest}"
REGISTRY="${REGISTRY-$DOCKER_REGISTRY}"
docker run --rm -d \
--cap-add=NET_ADMIN \
--net host \
-c 4 \
-m 2048M \
-v /etc/localtime:/etc/localtime:ro \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v "$(pwd):/home/wireshark/data" \
-e "DISPLAY=unix${DISPLAY}" \
--name wireshark \
"${REGISTRY}djds/wireshark:${tag}"