diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..b15bd5b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +.git +.github +test-data +*.md +LICENSE +Makefile +test.sh +.readme diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b9ea37e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,28 @@ +FROM debian:bookworm-slim + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + wireshark \ + tshark \ + xvfb \ + x11vnc \ + novnc \ + websockify \ + openbox \ + procps \ + && apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +RUN mkdir -p /root/.local/lib/wireshark/plugins + +COPY libp2p-common.lua libp2p-identify.lua libp2p-gossipsub.lua eth-consensus.lua \ + /root/.local/lib/wireshark/plugins/ + +COPY entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh + +EXPOSE 3000 + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..912feed --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,21 @@ +#!/bin/sh +set -e + +DISPLAY=:1 +export DISPLAY + +Xvfb $DISPLAY -screen 0 1920x1080x24 & +sleep 1 + +openbox & +wireshark & + +x11vnc -display $DISPLAY -forever -nopw -shared -rfbport 5900 & +sleep 1 + +cat > /usr/share/novnc/index.html <<'EOF' + +
+EOF + +websockify --web /usr/share/novnc 3000 localhost:5900