# Static (musl) build image for the server binaries. Extends the musl-cross toolchain image with # `protoc`, which admin-proto's build script (tonic-prost-build) needs to compile the gRPC .proto. FROM messense/rust-musl-cross:x86_64-musl # The base image's apt `protobuf-compiler` predates 3.15, so it rejects admin.proto's `proto3 optional` # fields. Install a pinned upstream protoc release instead. ARG PROTOC_VERSION=29.3 RUN apt-get update \ && apt-get install -y --no-install-recommends curl unzip ca-certificates \ && curl -fsSL -o /tmp/protoc.zip \ "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip" \ && unzip -o /tmp/protoc.zip -d /usr/local bin/protoc 'include/*' \ && rm /tmp/protoc.zip \ && rm -rf /var/lib/apt/lists/*