krikri-docker
forked from marghidanu/docrkrikri-docker
Docker Engine API client for Crystal.
This is a trimmed fork of marghidanu/docr (MIT), maintained by the krikri project. It carries the Docker/Podman compatibility fixes the fork needed and keeps only the API surface krikri uses, so the shard stays small enough to audit and to release on krikri's own cadence.
Installation
-
Add the dependency to your
shard.yml:dependencies: krikri-docker: github: weirdbricks/krikri-docker tag: v0.1.0 -
Run
shards install
Usage
require "krikri_docker"
client = KrikriDocker::Client.new # /var/run/docker.sock or DOCKER_HOST
api = KrikriDocker::API.new(client)
api.containers.list
A remote daemon takes the TCP constructor, optionally with TLS:
client = KrikriDocker::Client.new("docker.example.com", 2376, tls_context)
Supported API calls
Containers
- ContainerList
- ContainerCreate
- ContainerInspect
- ContainerStart
- ContainerStop
- ContainerDelete
Images
- ImageCreate (pull)
- ImageInspect
- ImageDelete
Networks
- NetworkList
- NetworkCreate
- NetworkInspect
- NetworkConnect
- NetworkDisconnect
- NetworkDelete
Volumes
- VolumeList
- VolumeCreate
- VolumeInspect
- VolumeDelete
System
- SystemAuth
- SystemVersion
Differences from upstream docr
- Module/namespace renamed
Docr->KrikriDocker(so both trees can be installed side by side). - Failures carry the request URL, status code, reason phrase and raw body, and the negotiated API version is cached per client, so callers can render the Docker Python SDK's
APIErrorwording without a second round trip. DOCKER_HOSTsupport, reconnect handling, TCP/TLS with atls_hostnameoverride, and the nullable/newer-Engine response shapes (Health.Log,LogConfig.Config, a missingGraphDriver).- Everything upstream has that krikri does not use (exec, build, push, tag, logs, events, system info, changes, top, waits, pauses, restart/kill, image history) is gone.
Contributors
- Tudor Marghidanu - creator and maintainer of upstream docr
- Troy Sornson - upstream contributor
- Krikri Contributors - fork maintenance
Repository
krikri-docker
Owner
Statistic
- 0
- 0
- 0
- 1
- 0
- 10 days ago
- August 3, 2026
License
MIT License
Links
Synced at
Tue, 24 Nov 2026 06:58:35 GMT
Languages