-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (29 loc) · 840 Bytes
/
Copy pathDockerfile
File metadata and controls
36 lines (29 loc) · 840 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
FROM node:22-bookworm-slim
# System deps:
# nmap → scanner
# libpcap-dev → compile pcap (ICMP listener)
# libpcap0.8 → runtime pcap
# python3 / make / g++ → compile native Node addons (sqlite3, raw-socket, pcap)
RUN apt-get update && apt-get install -y --no-install-recommends \
nmap \
libpcap-dev \
libpcap0.8 \
python3 \
make \
g++ \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install dependencies before copying the rest (better cache layer)
COPY package*.json ./
RUN npm install
# Copy application source
COPY . .
# Ensure persistent directories exist inside the image
# (actual data comes from bind-mounts at runtime)
RUN mkdir -p \
Sources/data \
Sources/files \
Sources/backups \
Sources/screenshotsB64
EXPOSE 80 443 53/tcp 53/udp
CMD ["node", "main.js"]