Docker compiling c++
This commit is contained in:
17
Dockerfile
17
Dockerfile
@@ -1,13 +1,22 @@
|
|||||||
#Building main conteiner
|
#Building main conteiner
|
||||||
FROM python:slim-buster
|
FROM python:slim-buster
|
||||||
|
|
||||||
RUN apt-get update && apt-get -y install build-essential libpcre3-dev git iptables libnetfilter-queue1
|
RUN apt-get update && apt-get -y install \
|
||||||
RUN git clone https://gitlab.com/guerrera.nicola/pypacker && cd pypacker && pip3 install .
|
build-essential git iptables libpcre2-dev\
|
||||||
|
libnetfilter-queue-dev libtins-dev\
|
||||||
|
libnfnetlink-dev libmnl-dev
|
||||||
|
|
||||||
WORKDIR /
|
WORKDIR /tmp/
|
||||||
RUN mkdir /execute
|
RUN git clone --branch release https://github.com/jpcre2/jpcre2
|
||||||
|
WORKDIR /tmp/jpcre2
|
||||||
|
RUN ./configure; make; make install
|
||||||
|
|
||||||
|
RUN mkdir /execute/
|
||||||
WORKDIR /execute
|
WORKDIR /execute
|
||||||
|
|
||||||
|
COPY ./backend/nfqueue /execute/nfqueue
|
||||||
|
RUN gcc nfqueue/nfqueue.cpp -o nfqueue/nfqueue -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 pip install --no-cache-dir -r /execute/requirements.txt
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -1,7 +1,7 @@
|
|||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <libmnl/libmnl.h>
|
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <tins/tins.h>
|
#include <tins/tins.h>
|
||||||
|
#include <libmnl/libmnl.h>
|
||||||
#include <linux/netfilter.h>
|
#include <linux/netfilter.h>
|
||||||
#include <linux/netfilter/nfnetlink.h>
|
#include <linux/netfilter/nfnetlink.h>
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user