sniffnet/Dockerfile
2026-11-12 17:24:16 +01:00

28 lines
673 B
Docker

FROM rust:1.99.1-slim-bookworm AS builder
# Install build dependencies for both X11 and Wayland
RUN apt-get update && apt-get install -y \
libpcap-dev \
libasound2-dev \
libfontconfig1-dev \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/sniffnet
COPY . .
RUN cargo build --locked --release
# Runtime stage
FROM debian:bookworm-slim
# Install runtime dependencies for both X11 and Wayland
RUN apt-get update && apt-get install -y \
libpcap0.8 \
libasound2 \
libfontconfig1 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/src/sniffnet/target/release/sniffnet /usr/local/bin/sniffnet
ENTRYPOINT ["sniffnet"]