asd
This commit is contained in:
17
Dockerfile
17
Dockerfile
@@ -15,8 +15,8 @@ RUN bun run build
|
||||
# Base Ubuntu container
|
||||
FROM --platform=$TARGETARCH ubuntu:24.04 AS base
|
||||
RUN apt-get update && apt-get install -y python3 libnetfilter-queue1 \
|
||||
libnfnetlink0 libmnl0 libcap-ng-utils nftables \
|
||||
libhs5 libtins4.4 python3-nftables libpcap0.8 && \
|
||||
libnfnetlink0 libmnl0 libcap-ng-utils libcap2-bin nftables \
|
||||
libhyperscan5 python3-nftables libpcap0.8 && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN mkdir -p /execute/modules
|
||||
@@ -26,9 +26,17 @@ FROM --platform=$TARGETARCH base AS compiler
|
||||
|
||||
RUN apt-get update && apt-get install -y python3-dev build-essential g++ \
|
||||
libnetfilter-queue-dev libnfnetlink-dev libmnl-dev \
|
||||
libhyperscan-dev libtins-dev libpcap-dev libboost-dev pkg-config && \
|
||||
libhyperscan-dev libpcap-dev libboost-dev pkg-config wget cmake && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Build libtins from source as it's not available in Ubuntu 24.04
|
||||
RUN wget https://github.com/mfontanini/libtins/archive/v4.5.tar.gz && \
|
||||
tar -xzf v4.5.tar.gz && cd libtins-4.5 && \
|
||||
mkdir build && cd build && \
|
||||
cmake ../ -DLIBTINS_ENABLE_CXX11=1 && \
|
||||
make && make install && ldconfig && \
|
||||
cd ../.. && rm -rf libtins-4.5 v4.5.tar.gz
|
||||
|
||||
COPY ./backend/binsrc /execute/binsrc
|
||||
RUN g++ binsrc/nfregex.cpp -o cppregex -std=c++23 -O3 -lnetfilter_queue -pthread -lnfnetlink $(pkg-config --cflags --libs libtins libhs libmnl)
|
||||
RUN g++ binsrc/nfproxy.cpp -o cpproxy -std=c++23 -O3 -lnetfilter_queue -lpython3.12 -pthread -lnfnetlink $(pkg-config --cflags --libs libtins libmnl python3)
|
||||
@@ -47,6 +55,9 @@ RUN apt-get update && apt-get install -y g++ python3-dev python3-pip git && \
|
||||
|
||||
COPY ./backend/ /execute/
|
||||
COPY --from=compiler /execute/cppregex /execute/cpproxy /execute/modules/
|
||||
COPY --from=compiler /usr/local/lib/libtins* /usr/local/lib/
|
||||
COPY --from=frontend /app/dist/ ./frontend/
|
||||
|
||||
RUN ldconfig
|
||||
|
||||
CMD ["/bin/sh", "/execute/docker-entrypoint.sh"]
|
||||
|
||||
Reference in New Issue
Block a user