-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (20 loc) · 701 Bytes
/
Dockerfile
File metadata and controls
27 lines (20 loc) · 701 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
# 1) Base image with C++ build tools, libpcap, Python
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
# 2) Install dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential libpcap-dev \
python3 python3-pip && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
# 3) Copy source and scripts
COPY main.cpp udp_listener.py requirements.txt entrypoint.sh ./
# 4) Build the C++ agent
RUN g++ -O3 -std=c++17 main.cpp -lpcap -o flowtrace
# 5) Install Python requirements
RUN pip3 install --no-cache-dir -r requirements.txt
# 6) Make entrypoint executable
RUN chmod +x entrypoint.sh
# 7) Run the unified entrypoint
ENTRYPOINT ["./entrypoint.sh"]