mirror of
https://github.com/hanzoai/cloud.git
synced 2026-11-17 16:36:24 +00:00
The single Go binary that runs the compute/backend control plane: KMS secrets, object storage, DNS/provisioning, PaaS, code + exec, zero-trust sharing, audit, gateway edge, feature flags, security, and the plugin runtime — every subsystem mounted from one composition root. Open-core by construction, not by deletion. The proprietary planes — identity, commerce, AI inference, observability, the message bus, billing — are injected through the cloud/types extension interfaces, so this binary links only public infrastructure libraries and a missing plane mounts fail-closed and says so rather than pretending to work. Published from a fresh root rather than a filtered history: the extraction it came from began life without git, and a squashed root is the only way to be sure no earlier blob travels with it. Runs on a laptop with no Kubernetes, no cluster and no external services — `CLOUD_DEV_UNENCRYPTED=1 cloud -data-dir /tmp/cloud` boots ~32 subsystems on HTTP and ZAP. Encryption at rest stays fatal-by-default on a capable build; the dev flag relaxes only the no-key case, loudly. Co-authored-by: Hanzo Dev <[email protected]>
27 lines
1.5 KiB
Docker
27 lines
1.5 KiB
Docker
# hanzoai/cloud-flags — the native flag-evaluator staticlib (hanzo-flags).
|
|
#
|
|
# Built ONCE per native/flags change as a versioned image whose rootfs is just
|
|
# libhanzo_flags.a, so cloud's main build pulls it (FROM ${FLAGS_IMAGE} AS
|
|
# flagslib + COPY --from=flagslib /libhanzo_flags.a) instead of recompiling Rust
|
|
# every release. amd64/musl static archive; links clean into the alpine CGO build.
|
|
#
|
|
# Build context is this directory (native/flags). The compiler cache (zccache)
|
|
# lives on the CI RUNNER, not in this bare image build — after decomplection the
|
|
# published .a is itself the S3-backed cross-build artifact.
|
|
#
|
|
# Base = public.ecr.aws (NOT ghcr.io/hanzoai/mirror/rust, digest-identical): this
|
|
# image is built by the hanzoai/ci reusable, which logs into GHCR with the repo's
|
|
# GITHUB_TOKEN — and that token cannot pull the cross-repo-linked private mirror
|
|
# packages (403), so the mirror FROM fails the whole images: build and cloud-flags
|
|
# never publishes → the release then breaks at FROM cloud-flags:latest. cloud-flags
|
|
# builds RARELY (only on native/flags changes), so ECR's anon rate-limit is a
|
|
# non-issue here. Digest-pinned to the exact manifest the mirror mirrors.
|
|
FROM public.ecr.aws/docker/library/rust:1-alpine3.22@sha256:b348cb409ac0a73de15065997a360063cf87465574a15e3e4469862cb8996f02 AS build
|
|
RUN apk add --no-cache musl-dev
|
|
WORKDIR /src
|
|
COPY Cargo.toml Cargo.lock ./
|
|
COPY src ./src
|
|
RUN cargo build --release --locked
|
|
FROM scratch
|
|
COPY --from=build /src/target/release/libhanzo_flags.a /libhanzo_flags.a
|