diff --git a/Dockerfile.mayhem b/Dockerfile.mayhem index 6b1a0913..24ed70b7 100644 --- a/Dockerfile.mayhem +++ b/Dockerfile.mayhem @@ -8,14 +8,11 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y ccache flex bison libnl-3- COPY . /repo WORKDIR /repo -RUN ./configure +RUN ./configure --prefix=/install RUN make -j8 - -RUN mkdir -p /deps -RUN ldd /repo/mausezahn/mausezahn | tr -s '[:blank:]' '\n' | grep '^/' | xargs -I % sh -c 'cp % /deps;' +RUN make install FROM ubuntu:22.04 as package - -COPY --from=builder /deps /deps -COPY --from=builder /repo/mausezahn/mausezahn /repo/mausezahn/mausezahn -ENV LD_LIBRARY_PATH=/deps +RUN apt-get update +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y libpcap-dev libcli-dev libnet1-dev +COPY --from=builder /install /install diff --git a/Mayhemfile b/Mayhemfile index c73008c8..19f0b546 100644 --- a/Mayhemfile +++ b/Mayhemfile @@ -2,4 +2,4 @@ project: netsniff-ng target: mausezahn cmds: - - cmd: /repo/mausezahn/mausezahn eth0 -f @@ + - cmd: /install/sbin/mausezahn eth0 -f @@