2023-04-29 09:53:07 +02:00
|
|
|
FROM node:20-bullseye-slim AS frontend
|
2022-08-03 13:44:30 +02:00
|
|
|
RUN mkdir /app
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
ADD ./frontend/package.json .
|
2023-06-04 20:21:19 +02:00
|
|
|
ADD ./frontend/yarn.lock .
|
2023-04-29 09:53:07 +02:00
|
|
|
RUN yarn install
|
2022-08-03 13:44:30 +02:00
|
|
|
COPY ./frontend/ .
|
2023-04-29 09:53:07 +02:00
|
|
|
RUN yarn build
|
2022-08-03 13:44:30 +02:00
|
|
|
|
|
|
|
|
|
2022-06-12 20:02:05 +02:00
|
|
|
#Building main conteiner
|
2023-06-04 23:06:04 +02:00
|
|
|
FROM debian:bookworm-slim as base
|
|
|
|
|
RUN apt-get update -qq && apt-get upgrade -qq
|
|
|
|
|
RUN apt-get install -qq python3-pip build-essential
|
|
|
|
|
RUN apt-get install -qq git libpcre2-dev libnetfilter-queue-dev
|
|
|
|
|
RUN apt-get install -qq libssl-dev libnfnetlink-dev libmnl-dev libcap2-bin
|
|
|
|
|
RUN apt-get install -qq make cmake nftables libboost-all-dev autoconf
|
|
|
|
|
RUN apt-get install -qq automake cargo libffi-dev libtins-dev #python3-nftables
|
2022-07-01 02:29:28 +02:00
|
|
|
|
2022-07-17 10:36:14 +02:00
|
|
|
WORKDIR /tmp/
|
2022-07-19 17:56:54 +02:00
|
|
|
RUN git clone --single-branch --branch release https://github.com/jpcre2/jpcre2
|
2022-07-17 10:36:14 +02:00
|
|
|
WORKDIR /tmp/jpcre2
|
2023-04-29 00:14:50 +02:00
|
|
|
RUN ./configure; make -j`nproc`; make install
|
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
|
|
|
|
|
|
2022-07-22 01:12:54 +02:00
|
|
|
ADD ./backend/requirements.txt /execute/requirements.txt
|
2023-06-04 23:06:04 +02:00
|
|
|
RUN pip3 install --no-cache-dir --break-system-packages -r /execute/requirements.txt --no-warn-script-location
|
2022-08-02 13:13:58 +00:00
|
|
|
|
2022-07-22 00:34:57 +02:00
|
|
|
COPY ./backend/binsrc /execute/binsrc
|
2022-08-03 12:12:53 +02:00
|
|
|
RUN g++ binsrc/nfqueue.cpp -o modules/cppqueue -O3 -lnetfilter_queue -pthread -lpcre2-8 -ltins -lmnl -lnfnetlink
|
|
|
|
|
RUN g++ binsrc/proxy.cpp -o modules/proxy -O3 -pthread -lboost_system -lboost_thread -lpcre2-8
|
2022-07-17 10:36:14 +02:00
|
|
|
|
2022-06-28 16:02:52 +02:00
|
|
|
COPY ./backend/ /execute/
|
2022-08-03 13:44:30 +02:00
|
|
|
COPY --from=frontend /app/build/ ./frontend/
|
2022-08-10 10:23:37 +00:00
|
|
|
|
|
|
|
|
CMD ["/bin/sh", "/execute/docker-entrypoint.sh"]
|
2022-06-12 20:02:05 +02:00
|
|
|
|
|
|
|
|
|