Dockerfile.base 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. FROM debian:13-slim
  2. ARG REPO_USER
  3. ARG REPO_PASS
  4. ENV DEBIAN_FRONTEND=noninteractive
  5. RUN apt-get update && apt-get install -y --no-install-recommends \
  6. ca-certificates curl gnupg cmake ninja-build g++ pkg-config git \
  7. nlohmann-json3-dev libspdlog-dev libfmt-dev libssl-dev libsystemd-dev \
  8. protobuf-compiler libprotobuf-dev libgrpc++-dev protobuf-compiler-grpc \
  9. && rm -rf /var/lib/apt/lists/*
  10. # Note: the gRPC/protobuf dev packages above are required so that the cmake
  11. # config shipped by libsmartbotic-db-client-dev can resolve `find_dependency(gRPC
  12. # CONFIG)`. Without protobuf-compiler-grpc, trixie's gRPCTargets.cmake references
  13. # plugin files that aren't present and find_package fails fatally (before the
  14. # pkg-config fallback). Mirrors smartbotic-database's build base.
  15. # Node 22 for the web UI build (vite 7 needs node >=20.19/22).
  16. RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
  17. && apt-get install -y --no-install-recommends nodejs \
  18. && rm -rf /var/lib/apt/lists/*
  19. # Smartbotics apt repo - provides libsmartbotic-db-client-dev.
  20. #
  21. # The client version is PINNED on purpose. vectorapi links
  22. # libsmartbotic-db-client.so, and every 2.x shares one SONAME, so a deb built
  23. # against a newer client installs happily next to an older one on the target and
  24. # only segfaults on the next service restart. Keep this equal to the client
  25. # version installed on the deploy target; when the target's DB moves, bump this
  26. # and ship both together.
  27. ARG DB_CLIENT_VERSION=2.11.1-1
  28. RUN curl -fsSL https://repository.smartbotics.ai/smartbotics-repo.gpg \
  29. | gpg --dearmor -o /usr/share/keyrings/smartbotics-repo.gpg \
  30. && printf 'machine repository.smartbotics.ai\nlogin %s\npassword %s\n' "$REPO_USER" "$REPO_PASS" \
  31. > /etc/apt/auth.conf.d/smartbotics.conf \
  32. && chmod 600 /etc/apt/auth.conf.d/smartbotics.conf \
  33. && echo "deb [signed-by=/usr/share/keyrings/smartbotics-repo.gpg] https://repository.smartbotics.ai trixie main" \
  34. > /etc/apt/sources.list.d/smartbotics.list \
  35. && apt-get update \
  36. && apt-get install -y --no-install-recommends \
  37. "libsmartbotic-db-client-dev=${DB_CLIENT_VERSION}" \
  38. "libsmartbotic-db-client=${DB_CLIENT_VERSION}" \
  39. && rm -rf /var/lib/apt/lists/*