#======================================================================= # FILE: ci/Dockerfile # DESC: aarch64 (RK3588 / Ubuntu 20.04) build & test environment. # - Ubuntu 20.04 arm64 base (matches the target board) # - MOOS-IvP built from source and installed to /usr/local # - jsoncpp (the only extra dep used by pPowerManger) # NOTE: github.com is unreachable from the CN runner, so MOOS-IvP # is fetched as a tarball through a github proxy (with # fallbacks) instead of `git clone`. #======================================================================= FROM arm64v8/ubuntu:20.04 ENV DEBIAN_FRONTEND=noninteractive #----------------------------------------------------------------------- # Use Aliyun mirror for apt (faster from CN) then install toolchain #----------------------------------------------------------------------- RUN sed -i \ -e 's|http://ports.ubuntu.com/ubuntu-ports|http://mirrors.aliyun.com/ubuntu-ports|g' \ -e 's|http://archive.ubuntu.com/ubuntu|http://mirrors.aliyun.com/ubuntu|g' \ /etc/apt/sources.list && \ apt-get update && apt-get install -y --no-install-recommends \ build-essential \ cmake \ git \ ca-certificates \ curl \ tar \ libjsoncpp-dev \ rsync \ && rm -rf /var/lib/apt/lists/* #----------------------------------------------------------------------- # Fetch MOOS-IvP source tarball (github blocked -> try proxies then direct) #----------------------------------------------------------------------- RUN set -eux; \ ok=0; \ for p in "https://gh-proxy.com/" "https://ghfast.top/" "https://ghproxy.net/" "https://github.com/"; do \ if curl -fsSL --retry 3 --max-time 300 \ "${p}https://github.com/moos-ivp/moos-ivp/archive/refs/heads/main.tar.gz" \ -o /tmp/moos-ivp.tar.gz; then ok=1; break; fi; \ done; \ [ "$ok" = "1" ] || { echo "MOOS-IvP download failed"; exit 1; }; \ mkdir -p /opt/moos-ivp; \ tar -xzf /tmp/moos-ivp.tar.gz -C /opt/moos-ivp --strip-components=1; \ rm -f /tmp/moos-ivp.tar.gz; \ ls /opt/moos-ivp #----------------------------------------------------------------------- # Build & install MOOS-IvP (bundles MOOS core + essentials + geodesy + ivp) # build-moos.sh -m : skip GUI tools (no FLTK needed) # build-ivp.sh -n : skip GUI apps (no FLTK needed) # Installs libMOOS + MOOSConfig.cmake + ivp headers/libs to /usr/local, # matching the layout expected by the project's top-level CMakeLists.txt. #----------------------------------------------------------------------- WORKDIR /opt/moos-ivp RUN ./build-moos.sh -m -j"$(nproc)" && \ make -C build/MOOS/MOOSCore install && \ make -C build/MOOS/MOOSGeodesy install && \ ./build-ivp.sh -n -j"$(nproc)" && \ make -C build/ivp install && \ ldconfig WORKDIR /src