2024-09-26 17:21:01 +02:00
|
|
|
|
|
|
|
|
# Firegex Dockerfile UUID signature
|
|
|
|
|
# cf1795af-3284-4183-a888-81ad3590ad84
|
2025-09-15 10:22:47 +02:00
|
|
|
# Needed for run.py to detect the Dockerfile
|
2024-09-26 17:21:01 +02:00
|
|
|
|
|
|
|
|
|
2024-10-13 01:50:52 +02:00
|
|
|
FROM --platform=$BUILDPLATFORM oven/bun AS frontend
|
2022-08-03 13:44:30 +02:00
|
|
|
WORKDIR /app
|
|
|
|
|
ADD ./frontend/package.json .
|
2025-02-02 20:42:01 +01:00
|
|
|
ADD ./frontend/bun.lock .
|
2024-10-19 18:39:42 +02:00
|
|
|
RUN bun i
|
2022-08-03 13:44:30 +02:00
|
|
|
COPY ./frontend/ .
|
2024-04-09 02:20:51 +02:00
|
|
|
RUN bun run build
|
2022-08-03 13:44:30 +02:00
|
|
|
|
2025-06-21 15:23:44 +02:00
|
|
|
# Base fedora container
|
2025-10-13 15:38:38 +02:00
|
|
|
FROM --platform=$TARGETARCH quay.io/fedora/fedora:43 AS base
|
|
|
|
|
RUN dnf -y update && dnf install -y python3.14 libnetfilter_queue \
|
2025-09-28 22:24:46 +02:00
|
|
|
libnfnetlink libmnl libcap-ng-utils nftables \
|
|
|
|
|
vectorscan libtins python3-nftables libpcap && dnf clean all
|
2022-07-19 17:56:54 +02:00
|
|
|
|
2022-07-18 18:52:14 +02:00
|
|
|
RUN mkdir -p /execute/modules
|
2022-06-11 21:57:50 +02:00
|
|
|
WORKDIR /execute
|
|
|
|
|
|
2025-06-21 15:23:44 +02:00
|
|
|
FROM --platform=$TARGETARCH base AS compiler
|
|
|
|
|
|
2025-10-13 15:38:38 +02:00
|
|
|
RUN dnf -y update && dnf install -y python3.14-devel @development-tools gcc-c++ \
|
2025-09-28 22:25:26 +02:00
|
|
|
libnetfilter_queue-devel libnfnetlink-devel libmnl-devel \
|
|
|
|
|
vectorscan-devel libtins-devel libpcap-devel boost-devel
|
2025-06-21 15:23:44 +02:00
|
|
|
|
|
|
|
|
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)
|
2025-10-13 15:38:38 +02:00
|
|
|
RUN g++ binsrc/nfproxy.cpp -o cpproxy -std=c++23 -O3 -lnetfilter_queue -lpython3.14 -pthread -lnfnetlink $(pkg-config --cflags --libs libtins libmnl python3)
|
2025-03-15 10:01:33 +01:00
|
|
|
|
2025-06-21 15:23:44 +02:00
|
|
|
#Building main conteiner
|
|
|
|
|
FROM --platform=$TARGETARCH base AS final
|
2025-03-15 10:01:33 +01:00
|
|
|
|
2025-09-28 22:28:46 +02:00
|
|
|
COPY ./backend/requirements.txt /execute/requirements.txt
|
2025-03-07 18:22:18 +01:00
|
|
|
COPY ./fgex-lib /execute/fgex-lib
|
2022-08-02 13:13:58 +00:00
|
|
|
|
2025-10-13 15:38:38 +02:00
|
|
|
RUN dnf -y update && dnf install -y gcc-c++ python3.14-devel uv git &&\
|
2025-06-21 15:23:44 +02:00
|
|
|
uv pip install --no-cache --system ./fgex-lib &&\
|
2025-09-04 17:29:39 +02:00
|
|
|
uv pip install --no-cache --system -r /execute/requirements.txt &&\
|
2025-10-13 15:38:38 +02:00
|
|
|
uv cache clean && dnf remove -y gcc-c++ python3.14-devel uv git && dnf clean all
|
2022-07-17 10:36:14 +02:00
|
|
|
|
2022-06-28 16:02:52 +02:00
|
|
|
COPY ./backend/ /execute/
|
2025-06-21 15:23:44 +02:00
|
|
|
COPY --from=compiler /execute/cppregex /execute/cpproxy /execute/modules/
|
2023-06-05 00:55:38 +02:00
|
|
|
COPY --from=frontend /app/dist/ ./frontend/
|
2022-08-10 10:23:37 +00:00
|
|
|
|
|
|
|
|
CMD ["/bin/sh", "/execute/docker-entrypoint.sh"]
|