{"name":"@deckyard/docker","description":"A client for the Docker Engine API (and Podman's): containers, images, networks, volumes, exec and system","versions":{"0.1.0":{"version":"0.1.0","kind":"git","url":"https://github.com/deckyard/deck-docker.git","ref":"0.1.0","commit":"1cff11f25d2b502a0e1d12e17bcf7f220aa5e4a7","checksum":"","yanked":false,"license":"LGPL-3.0-only","requires":{},"engines":{"jennifer":"\u003e=0.26.0"},"capabilities":["net"],"keywords":["docker","podman","containers","images","engine-api"],"description":"A client for the Docker Engine API (and Podman's): containers, images, networks, volumes, exec and system","publishedAt":"1794693119","repoId":1458172969,"repoOwnerId":346943577,"repoOwner":"deckyard"},"0.2.0":{"version":"0.2.0","kind":"git","url":"https://github.com/deckyard/deck-docker.git","ref":"0.2.0","commit":"ee88f0eccc1e20c20b00f06d020b5fc4b64ecc1c","checksum":"","yanked":false,"license":"LGPL-3.0-only","requires":{},"engines":{"jennifer":"\u003e=0.26.0"},"capabilities":["net"],"keywords":["docker","podman","containers","images","engine-api"],"description":"A client for the Docker Engine API (and Podman's): containers, images, networks, volumes, exec and system","publishedAt":"1794770441","repoId":1458172969,"repoOwnerId":346943577,"repoOwner":"deckyard"},"0.3.0":{"version":"0.3.0","kind":"git","url":"https://github.com/deckyard/deck-docker.git","ref":"0.3.0","commit":"c936488a3e2e708efc7e887680c549e766161e16","checksum":"","yanked":false,"license":"LGPL-3.0-only","requires":{},"engines":{"jennifer":"\u003e=0.28.0"},"capabilities":["net"],"keywords":["docker","podman","containers","images","engine-api"],"description":"A client for the Docker Engine API (and Podman's): containers, images, networks, volumes, exec and system","publishedAt":"1795648198","repoId":1458172969,"repoOwnerId":346943577,"repoOwner":"deckyard"}},"readme":"# @deckyard/docker\n\n[![test](https://github.com/deckyard/deck-docker/actions/workflows/test.yml/badge.svg)](https://github.com/deckyard/deck-docker/actions/workflows/test.yml)\n[![Documentation](https://img.shields.io/badge/docs-github%20pages-blue)](https://deckyard.github.io/deck-docker/)\n[![release](https://img.shields.io/github/v/release/deckyard/deck-docker)](https://github.com/deckyard/deck-docker/releases/latest)\n\nA client for the Docker™ Engine API (and Podman™'s compatible one) for\n[Jennifer](https://jennifer-lang.dev/) programs: create, start, stop, kill,\nwait for and remove containers, read their logs and a stats sample; pull,\ntag, build and remove images; networks, volumes, detached exec, ping,\nversion, info and prune; `call` for any other endpoint. It negotiates the\nAPI version with the daemon, checks names and references before sending,\nand puts a deadline and a cap on every answer.\n\n**Infrastructure as Code (IaC).** Containers, images, networks and volumes\ncan be provisioned from a Jennifer program kept in version control and\nreviewed like any other code. Not every create verb is idempotent:\n`createContainer` and `createNetwork` fail (409) when the name is taken,\nwhile `createVolume` returns an existing volume of the same driver unchanged,\nand `pull`, `tagImage` and `build` can be run again. A re-runnable script\nlists what exists first (`containers`, `networks`, `volumes`, `images`, with\nlabel filters) or inspects by name; `startContainer` reports a container\nthat already runs. There is no plan or diff step, no Compose file support,\nand the deck does not detect drift.\n\n**[Documentation](https://deckyard.github.io/deck-docker/)**\n\n## Install\n\n```sh\njvc add @deckyard/docker\n```\n\nThis vendors the deck to `vendor/\u003cscope\u003e/docker/`. Without `jvc`, unpack the\n`src/` subtree of a release archive (`\u003cscope\u003e-docker-\u003cversion\u003e.tar.gz`) there.\n\n## Usage\n\n```jennifer\nimport \"@deckyard/docker/\" as docker;\n\ndef c as docker.Client init docker.negotiate(docker.client(\"tcp://127.0.0.1:2375\"));\ndef spec as docker.ContainerSpec init docker.withCmd(docker.containerSpec(\"alpine:3.22\"), [\"uname\", \"-a\"]);\ndef id as string init docker.createContainer($c, \"\", $spec);\ndocker.startContainer($c, $id);\ndocker.waitContainer($c, $id, \"not-running\");\nio.printf(\"%s\", docker.logs($c, $id, []).stdout);\ndocker.removeContainer($c, $id, false, false);\n```\n\nThe daemon is reached at `tcp://host:port` (its plain port: root-equivalent,\nso only on this machine unless `withPlainHttp`) or `https://` through a\nsocket proxy (`withToken`, `withBasicAuth`). `unix://` is refused until the\n`http` module can reach a Unix socket; until then expose the socket on\nloopback, as [Connecting](docs/connecting.md) shows. Logs, pull and build\noutput are read whole once they end; following a log and events wait for\nstreaming responses.\n\n## Requirements\n\nJennifer 0.28.0 or newer, with the `net` capability (the default binary;\nnot `jennifer-tiny`). A Docker daemon speaking Engine API 1.41 or later\n(Docker 20.10 and newer; Podman 6.2's service reports 1.44), reachable over\nTCP or an https proxy.\n\n## Development\n\n```sh\ntools/check-all.sh                   # the full gate, as CI runs it\njennifer test src/docker_test.j      # the test overlay\ntools/check-docs.sh                  # docs against the code\ntools/pack.sh dist                   # build the release archive\n```\n\nThe suite runs against a loopback fake with Docker's recorded replies; CI\nonly parse-checks the examples, which need a daemon.\n\n## Trademarks\n\nDocker™ is a trademark of Docker, Inc. Other product and company names, such\nas Podman™, may be trademarks of their respective owners. They are used only\nto identify the products this deck works with. This deck is an independent\nproject, not affiliated with, sponsored or endorsed by Docker, Inc. or the\nPodman project.\n\n## Licence\n\nLGPL-3.0-only, see [LICENSE](LICENSE). Copyright (C) 2026 mplx \u0026lt;mplx@jennifer-lang.dev\u0026gt;.\n\n`tools/check-headers.sh` checks every source file's SPDX header against\n`deck.toml`.\n"}