asd
This commit is contained in:
17
Dockerfile
17
Dockerfile
@@ -15,8 +15,8 @@ RUN bun run build
|
|||||||
# Base Ubuntu container
|
# Base Ubuntu container
|
||||||
FROM --platform=$TARGETARCH ubuntu:24.04 AS base
|
FROM --platform=$TARGETARCH ubuntu:24.04 AS base
|
||||||
RUN apt-get update && apt-get install -y python3 libnetfilter-queue1 \
|
RUN apt-get update && apt-get install -y python3 libnetfilter-queue1 \
|
||||||
libnfnetlink0 libmnl0 libcap-ng-utils nftables \
|
libnfnetlink0 libmnl0 libcap-ng-utils libcap2-bin nftables \
|
||||||
libhs5 libtins4.4 python3-nftables libpcap0.8 && \
|
libhyperscan5 python3-nftables libpcap0.8 && \
|
||||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN mkdir -p /execute/modules
|
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++ \
|
RUN apt-get update && apt-get install -y python3-dev build-essential g++ \
|
||||||
libnetfilter-queue-dev libnfnetlink-dev libmnl-dev \
|
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/*
|
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
|
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/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)
|
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 ./backend/ /execute/
|
||||||
COPY --from=compiler /execute/cppregex /execute/cpproxy /execute/modules/
|
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/
|
COPY --from=frontend /app/dist/ ./frontend/
|
||||||
|
|
||||||
|
RUN ldconfig
|
||||||
|
|
||||||
CMD ["/bin/sh", "/execute/docker-entrypoint.sh"]
|
CMD ["/bin/sh", "/execute/docker-entrypoint.sh"]
|
||||||
|
|||||||
@@ -5,4 +5,5 @@ psutil
|
|||||||
python-jose[cryptography]
|
python-jose[cryptography]
|
||||||
python-socketio
|
python-socketio
|
||||||
brotli
|
brotli
|
||||||
|
zstandard
|
||||||
#git+https://salsa.debian.org/pkg-netfilter-team/pkg-nftables#egg=nftables&subdirectory=py
|
#git+https://salsa.debian.org/pkg-netfilter-team/pkg-nftables#egg=nftables&subdirectory=py
|
||||||
|
|||||||
Reference in New Issue
Block a user