diff --git a/ci/Dockerfile b/ci/Dockerfile index 06c1576..d0aa9a0 100755 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -42,9 +42,7 @@ RUN --mount=type=secret,id=gitea_token \ #----------------------------------------------------------------------- # Build & install MOOS-IvP (bundles MOOS core + essentials + geodesy + ivp) # build-moos.sh -m : skip GUI tools (no FLTK needed) -# --with-proj=off : skip PROJ (its CPM fetch pulls from github) # build-ivp.sh -n : skip GUI apps (no FLTK needed) -# -u : skip UTM (depends on PROJ-backed geodesy) # Installs libMOOS + MOOSConfig.cmake + ivp headers/libs to /usr/local, # matching the layout expected by the project's top-level CMakeLists.txt. #----------------------------------------------------------------------- @@ -56,4 +54,13 @@ RUN ./build-moos.sh -m -j"$(nproc)" && \ make -C build/ivp install && \ ldconfig +#----------------------------------------------------------------------- +# netbase provides /etc/protocols, which MOOS needs at runtime +# (getprotobyname("tcp")). The base image lacks it, so MOOSDB would throw +# XPCException "Could Not Get Protocol By Name" at startup without it. +# Kept as a final layer so the (expensive) MOOS-IvP build stays cached. +#----------------------------------------------------------------------- +RUN apt-get update && apt-get install -y --no-install-recommends netbase \ + && rm -rf /var/lib/apt/lists/* + WORKDIR /src diff --git a/ci/build-test.sh b/ci/build-test.sh index 9fc0818..c647c0f 100755 --- a/ci/build-test.sh +++ b/ci/build-test.sh @@ -69,7 +69,7 @@ getent protocols tcp >/dev/null 2>&1 && echo "getprotobyname(tcp) OK" || echo "g getent hosts localhost >/dev/null 2>&1 && echo "gethostbyname(localhost) OK" || echo "gethostbyname(localhost) FAILED" echo "ulimit -n: $(ulimit -n)" -"${MOOSDB}" -s --moos_suicide_disable --moos_no_colour "${MISSION_FILE}" > /tmp/moosdb_smoke.log 2>&1 & +"${MOOSDB}" --moos_suicide_disable --moos_no_colour "${MISSION_FILE}" > /tmp/moosdb_smoke.log 2>&1 & MOOSDB_PID=$! sleep 3