-
-
Notifications
You must be signed in to change notification settings - Fork 188
Expand file tree
/
Copy pathDockerfile
More file actions
72 lines (56 loc) · 1.8 KB
/
Copy pathDockerfile
File metadata and controls
72 lines (56 loc) · 1.8 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# ============================================================================
# Rats Search v2 — C++/Qt6 Docker Build
# ============================================================================
# === Build Stage ===
FROM ubuntu:24.04 AS builder
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
ninja-build \
git \
qt6-base-dev \
qt6-websockets-dev \
qt6-tools-dev \
libgl1-mesa-dev \
libxkbcommon-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /src
COPY . .
# Build the project (console-only, no tests)
RUN cmake -B build -G "Ninja" \
-DCMAKE_BUILD_TYPE=Release \
-DRATS_SEARCH_USE_SYSTEM_LIBRATS=OFF \
-DRATS_SEARCH_BUILD_TESTS=OFF
RUN cmake --build build --config Release --parallel
# === Runtime Stage ===
FROM ubuntu:24.04
ARG DEBIAN_FRONTEND=noninteractive
# Install only the runtime libraries needed
RUN apt-get update && apt-get install -y --no-install-recommends \
libqt6core6t64 \
libqt6gui6t64 \
libqt6widgets6t64 \
libqt6network6t64 \
libqt6sql6t64 \
libqt6sql6-mysql \
libqt6concurrent6t64 \
libqt6websockets6 \
libgl1 \
libxkbcommon0 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy built binary
COPY --from=builder /src/build/bin/RatsSearch /app/
# Copy Manticore search engine binaries
COPY imports/linux/x64/searchd /app/
COPY imports/linux/x64/indexer /app/
COPY imports/linux/x64/indextool /app/
RUN chmod +x /app/RatsSearch /app/searchd /app/indexer /app/indextool
# Persistent data directory for database, config, and logs
VOLUME /data
# Default HTTP API port
EXPOSE 8095
# Run in console mode with spider enabled and 30 max peers
CMD ["/app/RatsSearch", "--console", "--spider", "--max-peers", "30", "--data-dir", "/data"]