| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- # smartbotic-automation Build Base Image
- # Pre-installed Debian 13 build dependencies for fast iterative builds.
- #
- # Build:
- # docker buildx build -f packaging/Dockerfile.base \
- # --build-arg REPO_PASS=<password> \
- # -t smartbotic-automation-build-base:debian13 .
- FROM debian:trixie
- ENV DEBIAN_FRONTEND=noninteractive
- RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates \
- && rm -rf /var/lib/apt/lists/*
- # SmartBotics APT repository (for libsmartbotic-db-client-dev)
- ARG REPO_USER=callerai
- ARG REPO_PASS
- # Pinned deliberately. Unpinned, the apt layer caches and a newer client in the
- # repository changes nothing at all - the image kept installing 2.11.3 for a
- # month after 2.12.0 was published, and nothing said so. Pinning makes the
- # version a declared fact, busts the layer when it is bumped, and turns a
- # missing version into a build failure instead of a silently old client.
- #
- # Keep this at the version the daemon runs. The client is backward compatible,
- # so a newer daemon with an older client works - it just cannot use anything
- # the newer one added.
- #
- # Two ERROR-SHAPE changes live under this unchanged soname, so a symbol or ABI
- # check reports "no consumer impact" and is wrong both times:
- #
- # 2.12.4 - a read whose "nothing there" value is also a valid answer now throws
- # Client::Error on a failed status instead of answering empty. Every read in
- # lib/storage/storage_client.cpp catches it.
- # 2.13.1 - DeadlineExceeded on a WRITE no longer means the write failed; it
- # carries reason "outcome_unknown", because the deadline can expire while the
- # server finishes it. We map that to ErrorCode::WriteOutcomeUnknown and
- # answer 504 WITHOUT inviting a retry, since repeating such a write can apply
- # it twice. Lowering the pin silently restores "please retry" on those.
- #
- # tests/cpp/storage_read_failures_test.cpp is written against both contracts and
- # fails on anything older, so do not lower this without reading it.
- ARG DB_CLIENT_VERSION=2.13.1-1
- COPY packaging/smartbotics-repo.gpg /usr/share/keyrings/smartbotics-repo.gpg
- RUN echo "deb [signed-by=/usr/share/keyrings/smartbotics-repo.gpg] https://repository.smartbotics.ai trixie main" \
- > /etc/apt/sources.list.d/smartbotics.list \
- && printf "machine repository.smartbotics.ai\nlogin %s\npassword %s\n" \
- "$REPO_USER" "$REPO_PASS" > /etc/apt/auth.conf.d/smartbotics.conf \
- && chmod 600 /etc/apt/auth.conf.d/smartbotics.conf \
- && apt-get update \
- && apt-get install -y --no-install-recommends \
- libsmartbotic-db-client-dev=${DB_CLIENT_VERSION} \
- libsmartbotic-db-client=${DB_CLIENT_VERSION} \
- && rm -rf /var/lib/apt/lists/* \
- && rm -f /etc/apt/auth.conf.d/smartbotics.conf \
- && rm -f /etc/apt/sources.list.d/smartbotics.list
- RUN apt-get update && apt-get install -y --no-install-recommends \
- # Build tools
- build-essential cmake ninja-build git pkg-config ccache dpkg-dev \
- # Compression / crypto / uuid
- libssl-dev zlib1g-dev libbrotli-dev uuid-dev \
- # gRPC + protobuf
- protobuf-compiler libprotobuf-dev libgrpc++-dev protobuf-compiler-grpc \
- # JSON + logging + fmt
- nlohmann-json3-dev libspdlog-dev libfmt-dev \
- # curl / websockets
- libcurl4-openssl-dev libwebsockets-dev \
- # MySQL/MariaDB + PostgreSQL clients. Without these the build still
- # succeeds and simply omits the mysql-query and postgresql-query nodes,
- # announced in one STATUS line - so a runner from this image registers a
- # node list quietly missing them, and a workflow using either fails with
- # an unknown node type only on hosts built this way.
- libmariadb-dev libpq-dev \
- # Image processing: Magick++ is the image node's engine, libexif reads EXIF.
- libmagick++-dev libexif-dev \
- # WebUI build (Node.js + npm)
- nodejs npm \
- && rm -rf /var/lib/apt/lists/* \
- && echo "smartbotic-automation:debian13:$(date -u +%Y-%m-%dT%H:%M:%SZ)" > /etc/smartbotic-automation-build-base
|