forked from REW-sploit/REW-sploit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (28 loc) · 1.08 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#
# To Build:
# sudo docker build -t rew-sploit/rew-sploit .
#
# To Run:
# sudo docker run --rm -it --name rew-sploit -v /tmp:/tmp rew-sploit/rew-sploit
#
FROM python:3.11-slim AS builder
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /app
COPY requirements.txt .
RUN apt-get update -y && \
apt-get install -y cpp gcc swig libssl-dev libpcap0.8-dev git build-essential && \
python -m venv .venv && \
.venv/bin/pip install --no-cache-dir -r requirements.txt && \
find .venv \( -type d -a -name test -o -name tests -o -name __pycache__ \) -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) -exec rm {} \;
FROM python:3.11-slim
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /app
COPY --from=builder /app .
COPY . /app
RUN apt-get update -y && \
apt-get install -y yara tcpdump libpcre3-dev && \
./.venv/bin/python apply_patch.py -f && \
ln -s /app/.venv/lib/python3.11/site-packages/app/.venv/lib/libyara.so /app/.venv/lib/ && \
apt-get autoremove -y && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
CMD [ "/app/.venv/bin/python", "rew-sploit.py"]