Docker
@hivemq/dockerv2026.06.26.156
01README
Thin swamp wrapper around the docker CLI. Image-lifecycle subset: build (single-platform, locally runnable), run, buildInspectPlatforms (build each arch single-arch with buildx --load + run an inspection command, capturing all output in one inspected resource — the verify-before-push primitive), login, and buildx build --push (multi-arch build + push). Each method mirrors a docker subcommand so workflows can drive the build/run/publish lifecycle without bespoke shell steps.
02Models
@hivemq/dockerv2026.06.26.2docker.ts
fn build(dockerfile: string, tag: string, platform?: string, noCache?: boolean, instanceName?: string)
docker build: write the given Dockerfile into a throwaway context and build a single-platform, locally runnable image.
| Argument | Type | Description |
|---|---|---|
| dockerfile | string | Full Dockerfile content |
| tag | string | Image tag to build (-t) |
| platform? | string | os/arch to build |
| noCache? | boolean | Pass --no-cache |
| instanceName? | string |
fn buildInspectPlatforms(dockerfile: string, tag: string, platforms: array, command: string, entrypoint?: string, noCache?: boolean, instanceName?: string)
docker buildx build --load per platform then docker run: build each platform single-arch, run `sh -c <command>` on it, and capture every platform's stdout in one resource. The verify-before-push primitive for multi-arch (the engine can't hold a multi-arch image); buildxBuild --push then re-runs from cache. Throws on a non-zero exit.
| Argument | Type | Description |
|---|---|---|
| dockerfile | string | Full Dockerfile content |
| tag | string | Base image tag (each arch builds <tag>-<arch>) |
| platforms | array | os/arch platforms to build + inspect (>=1) |
| command | string | Command passed to `-c` on each platform |
| entrypoint? | string | Entrypoint; defaults to sh |
| noCache? | boolean | Pass --no-cache |
| instanceName? | string |
fn buildxBuild(dockerfile: string, tag: string, platforms: array, noCache?: boolean, instanceName?: string)
docker buildx build --push: build a multi-arch image for the given platforms and push it (manifest list) in one step; captures the digest.
| Argument | Type | Description |
|---|---|---|
| dockerfile | string | Full Dockerfile content |
| tag | string | Image tag to build + push |
| platforms | array | os/arch platforms (>=1) |
| noCache? | boolean | Pass --no-cache |
| instanceName? | string |
fn run(image: string, command: string, platform?: string, entrypoint?: string, instanceName?: string)
docker 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 |
| instanceName? | string |
fn login(registry: string, username: string, instanceName?: string)
docker 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 |
| instanceName? | string |
Resources
build(infinite)— A single-platform `docker build` result
run(infinite)— A `docker run` result (stdout/stderr captured)
inspected(infinite)— A `buildInspectPlatforms` result: one command's stdout captured per platform (built single-arch and run)
pushed(infinite)— A `docker buildx build --push` result with the digest
login(infinite)— A `docker login` result
03Previous Versions
2026.06.25.146Jun 25, 2026
2026.06.25.124Jun 25, 2026
04Stats
D
50 / 100
Downloads
4
Archive size
13.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