-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (35 loc) · 1.55 KB
/
Copy pathDockerfile
File metadata and controls
44 lines (35 loc) · 1.55 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
# =============================================================================
# Dockerfile — Multi-stage build for NetworkModuleTest
# =============================================================================
# Stage 1: Build
# Stage 2: Runtime (minimal Debian)
# =============================================================================
# ── Stage 1: Builder ──────────────────────────────────────────────────────────
FROM ubuntu:22.04 AS builder
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential cmake && \
rm -rf /var/lib/apt/lists/*
WORKDIR /src
COPY . .
# Linux-docker profile: epoll backend, short timeouts
RUN cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
-DPROFILE=linux-docker \
-DENABLE_DATABASE_SUPPORT=OFF \
-DBUILD_SERVER_ENGINE=ON \
-DBUILD_TEST_SERVER=ON \
-DBUILD_DB_SERVER=ON && \
cmake --build build -j$(nproc)
# ── Stage 2: Runtime ──────────────────────────────────────────────────────────
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
libsqlite3-0 && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=builder /src/build/bin /app/bin
# Ports
# DBServer : 18002
# TestServer: 19010
EXPOSE 18002 19010
# Default entrypoint — override with docker-compose
ENTRYPOINT []