from debian to alpine linux for docker
This commit is contained in:
16
Dockerfile
16
Dockerfile
@@ -1,15 +1,17 @@
|
|||||||
#Building main conteiner
|
#Building main conteiner
|
||||||
FROM python:slim-bullseye
|
FROM python:alpine
|
||||||
|
|
||||||
RUN apt-get update && apt-get -y install \
|
RUN apk update
|
||||||
build-essential git nftables libpcre2-dev\
|
RUN apk add g++ git pcre2-dev libnetfilter_queue-dev libpcap-dev libcrypto1.1 libnfnetlink-dev libmnl-dev make cmake nftables
|
||||||
libnetfilter-queue-dev libtins-dev\
|
|
||||||
libnfnetlink-dev libmnl-dev
|
|
||||||
|
|
||||||
WORKDIR /tmp/
|
WORKDIR /tmp/
|
||||||
RUN git clone --branch release https://github.com/jpcre2/jpcre2
|
RUN git clone --single-branch --branch release https://github.com/jpcre2/jpcre2
|
||||||
|
RUN git clone --single-branch https://github.com/mfontanini/libtins.git
|
||||||
WORKDIR /tmp/jpcre2
|
WORKDIR /tmp/jpcre2
|
||||||
RUN ./configure; make; make install
|
RUN ./configure; make; make install
|
||||||
|
WORKDIR /tmp/libtins
|
||||||
|
RUN mkdir build; cd build; cmake ../ -DLIBTINS_ENABLE_CXX11=1; make; make install
|
||||||
|
|
||||||
|
|
||||||
RUN mkdir -p /execute/modules
|
RUN mkdir -p /execute/modules
|
||||||
WORKDIR /execute
|
WORKDIR /execute
|
||||||
@@ -19,7 +21,7 @@ COPY ./backend/nfqueue /execute/nfqueue
|
|||||||
RUN g++ nfqueue/nfqueue.cpp -o modules/cppqueue -std=c++20 -O3 -march=native -lnetfilter_queue -pthread -lpcre2-8 -ltins -lmnl -lnfnetlink
|
RUN g++ nfqueue/nfqueue.cpp -o modules/cppqueue -std=c++20 -O3 -march=native -lnetfilter_queue -pthread -lpcre2-8 -ltins -lmnl -lnfnetlink
|
||||||
|
|
||||||
ADD ./backend/requirements.txt /execute/requirements.txt
|
ADD ./backend/requirements.txt /execute/requirements.txt
|
||||||
RUN pip install --no-cache-dir -r /execute/requirements.txt
|
RUN pip3 install --no-cache-dir -r /execute/requirements.txt
|
||||||
|
|
||||||
COPY ./backend/ /execute/
|
COPY ./backend/ /execute/
|
||||||
COPY ./frontend/build/ ./frontend/
|
COPY ./frontend/build/ ./frontend/
|
||||||
|
|||||||
Reference in New Issue
Block a user