Container
@hivemq/containerv2026.06.25.133
01README
Thin swamp wrapper around Apple's container CLI (a macOS container platform — Linux containers in lightweight VMs on Apple Silicon, no Docker daemon). Image-lifecycle subset: build, run, image push, registry login — each method mirrors a container subcommand so workflows can drive the build/run/publish lifecycle without bespoke shell steps. Verified against container CLI 1.0.0: no manifest subcommand, so a single multi-arch image is built with repeated --arch and pushed whole with image push.
02Models
@hivemq/containerv2026.06.25.2container.ts
fn build(dockerfile: string, tag: string, noCache?: boolean)
container build: write the given Dockerfile into a throwaway context and build the tag. One platform → single-arch (--platform); many → one multi-arch image (--arch per platform).
| Argument | Type | Description |
|---|---|---|
| dockerfile | string | Full Dockerfile/Containerfile content |
| tag | string | Image tag to build (-t) |
| noCache? | boolean | Pass --no-cache |
fn run(image: string, command: string, platform?: string, entrypoint?: string)
container run --rm: run `sh -c <command>` (or a custom entrypoint) in a throwaway container and capture stdout. Throws on a non-zero exit.
| Argument | Type | Description |
|---|---|---|
| image | string | Image reference to run |
| command | string | Command passed to `-c` |
| platform? | string | os/arch to run |
| entrypoint? | string | Entrypoint; defaults to sh |
fn inspectPlatforms(image: string, command: string, entrypoint?: string)
container run per platform: run `sh -c <command>` against the image once for each platform (--platform) and capture each platform's stdout in one resource. For verifying a multi-arch image on every arch. Throws on a non-zero exit.
| Argument | Type | Description |
|---|---|---|
| image | string | Image reference to inspect |
| command | string | Command passed to `-c` |
| entrypoint? | string | Entrypoint; defaults to sh |
fn imagePush(tag: string)
container image push: push a (multi-arch) image and capture its digest from the push output.
| Argument | Type | Description |
|---|---|---|
| tag | string | Image tag to push |
fn registryLogin(registry: string, username: string)
container registry login: authenticate to a registry; the password is piped on stdin (--password-stdin), never argv.
| Argument | Type | Description |
|---|---|---|
| registry | string | Registry server name |
| username | string | Registry username |
Resources
build(infinite)— A `container build` result
run(infinite)— A `container run` result (stdout/stderr captured)
inspected(infinite)— An `inspectPlatforms` result: one command's stdout captured per platform of a multi-arch image
pushed(infinite)— A `container image push` result with the pushed digest
login(infinite)— A `container registry login` result
03Previous Versions
2026.06.25.124Jun 25, 2026
04Stats
D
50 / 100
Downloads
15
Archive size
9.1 KB
- Has README or module doc0/2missing
- README has a code example0/1missing
- README is substantive0/1pending
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared0/1missing
- Verified public repository0/2missing
05Platforms
06Labels