Containers surface: contract types, config awareness, skopeo image plumbing#3
Open
horner wants to merge 5 commits into
Open
Containers surface: contract types, config awareness, skopeo image plumbing#3horner wants to merge 5 commits into
horner wants to merge 5 commits into
Conversation
CloudContainerNamespace/CloudContainerStub aliases (a container binding is a DO namespace), header-table row, README binding tables + Containers section with per-target support matrix.
- schema: 'docker' driver reserved + per-target registry block (Harbor) - config.mjs: parse wrangler 'containers' array; expose containers + containerBindings (DO binding name -> container entry) - host.mjs: container-backed DO bindings boot cleanly and throw UnsupportedBindingError on first use (with hint), instead of crashing - createUnsupportedBinding gains optional hint param - sample configs: commented reserved registry/driver shapes
- images.mjs: detectBuilder (buildah>docker), build, skopeo copy push (sha + latest tags), inspect, status; digest pins in .mieweb/images.lock.json - registry login/logout via skopeo (authFile, password prompted, never argv) - index.mjs: 'images'/'registry' verbs; cloudflare push delegates to 'wrangler containers push' - packages/cli README with Images section (prereqs, conventions, lockfile)
buildah build + skopeo copy to Harbor with a robot account, digest lockfile bump committed by CI. Example only — runs in consuming apps once the opensource-server cluster (Forgejo+Harbor) is up.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reserves Cloudflare Containers as a portable surface of the
@mieweb/cloudcontract and lands the cheap milestones (M0–M2 + the M3 sketch) from container-plan.md. The expensive part — an off-Cloudflare container runtime (M4) — is deliberately deferred until a real consumer app needs it.What's in here
container-plan.md): milestones with checkboxes, the skopeo/Harbor image pipeline, proposed CLI UX, and themyapp(LibreOffice doc-conversion) walkthrough.@mieweb/cloud-types):CloudContainerNamespace/CloudContainerStubaliases (a container binding is a DO namespace), primitive-table row, README binding tables + a Containers section with the per-target support matrix.dockerdriver and a per-targetregistryblock (Harbor formieweb);config.mjsparses wrangler'scontainersarray intocontainerBindings; the host harness auto-wires container-backed DO bindings toUnsupportedBindingError— boot cleanly, throw on first use with a hint (same pattern as Vectorize/AI).createUnsupportedBindinggains an optionalhintparam.packages/cli/src/images.mjs):mieweb images build|push|inspect|status— build once with buildah (docker fallback),skopeo copyto the target registry tagged<git sha>+latest, manifest digests pinned in.mieweb/images.lock.json;mieweb registry login|logout(authFile, password prompted — never argv/logged). On--target cloudflare,images pushdelegates towrangler containers push. Newpackages/cli/README.mddocuments prerequisites and conventions.packages/test-app/forgejo-images.example.yml, the Forgejo Actions pipeline (buildah → skopeo → Harbor robot account) for consuming apps once the opensource-server cluster is up.Behavior notes
cloudflaretarget — wrangler keeps handlingcontainersnatively.images/registryverbs are actually used.pnpm -r test); CLI error paths smoke-tested (missing registry, unknown container, no lockfile).Not in this PR (tracked in container-plan.md)
ctx.containeradapter + conformance section.