mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-25 07:45:01 +00:00
🐳 Bring in module-loader
Dockerfile
This commit is contained in:
parent
7c8adee7a8
commit
cc78b291af
33
module-loader/Dockerfile
Normal file
33
module-loader/Dockerfile
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
### Builder image
|
||||||
|
ARG TARGETARCH=amd64
|
||||||
|
FROM ${TARGETARCH}/debian:bullseye AS builder
|
||||||
|
|
||||||
|
ARG KERNEL_VERSION
|
||||||
|
|
||||||
|
RUN apt-get update
|
||||||
|
RUN apt-get install -y -q \
|
||||||
|
curl \
|
||||||
|
build-essential \
|
||||||
|
linux-headers-${KERNEL_VERSION}
|
||||||
|
|
||||||
|
WORKDIR /work
|
||||||
|
RUN curl https://github.com/ntop/PF_RING/archive/refs/tags/8.4.0.tar.gz -Lo ./pfring.tar.xz && \
|
||||||
|
tar -xf pfring.tar.xz && \
|
||||||
|
mv ./PF_RING-* ./pfring
|
||||||
|
|
||||||
|
WORKDIR /work/pfring/kernel
|
||||||
|
ENV KERNELRELEASE=${KERNEL_VERSION}
|
||||||
|
RUN make
|
||||||
|
|
||||||
|
|
||||||
|
### The shipped image
|
||||||
|
ARG TARGETARCH=amd64
|
||||||
|
FROM ${TARGETARCH}/debian:bullseye
|
||||||
|
|
||||||
|
ARG KERNEL_VERSION
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y kmod
|
||||||
|
|
||||||
|
COPY --from=builder /work/pfring/kernel/pf_ring.ko /opt/lib/modules/${KERNEL_VERSION}/
|
||||||
|
|
||||||
|
RUN depmod -b /opt ${KERNEL_VERSION}
|
5
module-loader/build-push.sh
Executable file
5
module-loader/build-push.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Build it on x86_64
|
||||||
|
docker build . -t kubeshark/module-loader:latest --build-arg KERNEL_VERSION="5.10.0-23-amd64" && docker push kubeshark/module-loader:latest
|
Loading…
Reference in New Issue
Block a user