Minimal API functionality with unit tests, could be used for integration tests with Unity server. For internal testing used RPC_server implementation
41 lines
1.1 KiB
Docker
41 lines
1.1 KiB
Docker
# Use Ubuntu 24.04 as base (matching development environment)
|
|
FROM ubuntu:24.04
|
|
|
|
# Avoid interactive prompts during package installation
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# Install dependencies
|
|
# - build-essential: Compiler (gcc/g++)
|
|
# - meson/ninja-build: Build system
|
|
# - git: For fetching subprojects
|
|
# - pkg-config, cmake: For dependency resolution
|
|
# - libssl-dev: Often needed for cmake fetches/networking
|
|
RUN apt-get update && apt-get install -y \
|
|
build-essential \
|
|
meson \
|
|
ninja-build \
|
|
git \
|
|
pkg-config \
|
|
cmake \
|
|
ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Copy project files
|
|
COPY . .
|
|
|
|
# Setup build directory and compile
|
|
# We allow git to fetch subprojects (glog, gtest, asio, etc.)
|
|
RUN meson setup build && \
|
|
meson compile -C build
|
|
|
|
# Expose the default port (can be changed in config.yaml)
|
|
EXPOSE 8080
|
|
|
|
# Run the server by default
|
|
# We assume the config.yaml is in the root /app or we copy it.
|
|
# The build output is in build/src/cloud_point_rpc_server
|
|
CMD ["./build/src/cloud_point_rpc_server", "config.yaml"]
|