53 lines
1.3 KiB
Docker
53 lines
1.3 KiB
Docker
FROM dart:3.9.0-100.2.beta
|
|
|
|
# Install WireGuard tools for IPC communication and network monitoring
|
|
RUN apt-get update && apt-get install -y \
|
|
wireguard-tools \
|
|
iproute2 \
|
|
iptables \
|
|
tcpdump \
|
|
build-essential \
|
|
git \
|
|
libpcap-dev \
|
|
libjson-c-dev \
|
|
pkg-config \
|
|
autoconf \
|
|
automake \
|
|
libtool \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Build and install nDPI
|
|
RUN git clone https://github.com/ntop/nDPI.git /tmp/nDPI && \
|
|
cd /tmp/nDPI && \
|
|
./autogen.sh && \
|
|
./configure --with-pic && \
|
|
make && \
|
|
make install && \
|
|
ldconfig && \
|
|
rm -rf /tmp/nDPI
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy pubspec files first (for dependency caching)
|
|
COPY pubspec.yaml pubspec.lock ./
|
|
|
|
# Get dependencies (cached layer)
|
|
RUN dart pub get
|
|
|
|
# Copy source code (invalidates cache from here)
|
|
COPY lib/ ./lib/
|
|
COPY protocol_analyzer.c ./
|
|
|
|
# Debug: Check what nDPI installed
|
|
RUN find /usr -name "*ndpi*" -type f 2>/dev/null | head -10
|
|
RUN find /usr -name "*.h" -path "*ndpi*" 2>/dev/null | head -10
|
|
|
|
# Compile the C protocol analyzer
|
|
RUN gcc -o protocol_analyzer protocol_analyzer.c -I/usr/local/include -I/usr/local/include/libndpi-4.8.0/libndpi -L/usr/local/lib -lndpi -lpcap
|
|
|
|
# Compile the application
|
|
RUN dart compile exe lib/main.dart -o waylume_server
|
|
|
|
EXPOSE 3000 51820/udp
|
|
|
|
CMD ["./waylume_server"] |