- Remove SUNDIALS from C++ Dockerfile (replaced by RK45 in T03) - Fix CMake source path to core/ after T05 reorganization - Add docker/api/Dockerfile: multi-stage Node 20 build for Fastify API - Add docker/web/Dockerfile: Vite dev server with WASM volume mount - Rewrite docker-compose.yml: core (C++ ci build), api, web services - Add server.host=0.0.0.0 to vite.config.ts for Docker networking Run everything: docker compose up --build Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
33 lines
829 B
Docker
33 lines
829 B
Docker
# Stage 1: builder — system deps only, no source
|
|
FROM ubuntu:22.04 AS builder
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
gcc-12 \
|
|
g++-12 \
|
|
cmake \
|
|
ninja-build \
|
|
git \
|
|
curl \
|
|
ca-certificates \
|
|
libcgal-dev \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 \
|
|
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100
|
|
|
|
WORKDIR /src
|
|
# Stage 2: ci — copies source, builds, and tests
|
|
FROM builder AS ci
|
|
|
|
COPY core/ /src/core/
|
|
|
|
RUN cmake -B /build -S /src/core \
|
|
-GNinja \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DYMIR_BUILD_TESTS=ON \
|
|
&& cmake --build /build --parallel \
|
|
&& ctest --test-dir /build --output-on-failure
|