-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (30 loc) · 858 Bytes
/
Copy pathDockerfile
File metadata and controls
38 lines (30 loc) · 858 Bytes
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
30
31
32
33
34
35
36
37
38
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
# Install system dependencies
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
python3-dev \
libpcap-dev \
tcpdump \
iptables \
iproute2 \
net-tools \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements and install Python packages
COPY requirements.txt .
# Use environment variable instead of --break-system-packages flag
ENV PIP_BREAK_SYSTEM_PACKAGES=1
RUN pip3 install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Create necessary directories
RUN mkdir -p logs data
# Set permissions
RUN chmod +x main.py path_monitor/path_monitor.py ddos_defense/ddos_defense.py 2>/dev/null || true
# Set default entry point
ENTRYPOINT ["python3", "main.py"]
CMD ["--help"]