Co-authored-by: Brad Hallett <53977268+bradhallett@users.noreply.github.com>
18 KiB
Features
What Kiri supports today, through the kiri Docker context.
Platforms
Apple silicon and Intel Macs (macOS 14+), Windows 10 and 11 (x86-64 and Arm, through WSL 2), and Linux (.deb and .rpm, tested on Ubuntu and Fedora).
What works
- Containers:
run(--rm,-d,-it,-e,-u,-w,--name,--restart,--entrypoint),exec,logs,attach,stop,kill,restart,rm,wait,rename,pause/unpause,update,stats,top,diff,export,commit,cp(both ways, running or not),container prune; records survive a daemon restart; filters on every list; healthchecks (--health-cmdand the other--health-*options, including--health-start-interval;ps --filter health=) - Limits and security:
--memory,--cpus,--cpu-shares,--pids-limit,--shm-size; Docker's default capabilities and a default seccomp filter;--cap-add/--cap-drop,--privileged,--read-only,--security-opt seccomp=unconfinedandno-new-privileges. Even privileged and unconfined containers keep the host boundary: no vsock sockets (the way to the Mac) and no io_uring - Networking: a default bridge, user networks with DNS by name and
alias,
network connect/disconnect(as with Docker, a container can leave any of its networks, its first one too: another of its networks then gives its default route, and with none left it has no network, as with--network none; to leave its first network a running container is stopped first),--network host|none,-p/-P(TCP and UDP) on all interfaces (as Docker does;-p 127.0.0.1:8080:80keeps a port local),--add-host,host.docker.internal,--network container:<name>(Composenetwork_mode: service:x; as with Docker, if that container restarts, the ones sharing its network keep the old, now empty namespace until they are restarted too), IPAM (--subnet,--gateway,--ip-range,--aux-address),--ip,--mac-address,--dns,--dns-search,--dns-option,--domainname,--link,--ipv6(Composeenable_ipv6: an IPv6 subnet beside the IPv4 one, from--subnetor a /64 of Kiri's own under fd00::/8; the default bridge stays IPv4-only, as Docker's does), andhttp://<name>.kiri.localonce you turn it on (the app asks on first open; Settings → Domains changes it), orhttp://<name>.kiri.localhostwith no setup. Compose services answer at<service>.<project>.kiri.local, and adev.kiri.domain=api.myapplabel picks a container's own names; HTTPS too (https://<name>.kiri.local), with Kiri's own certificate authority in~/.kiri/tls, whose name constraints allow only*.kiri.localand*.kiri.localhost(Settings → Domains → HTTPS asks macOS to trust it). The routers' ports from the terminal:kiri domainsshows them,kiri domains set --http 8080 --https 8443moves them with no restart,kiri domains resetputs back 80 and 443 - Storage: named and anonymous volumes, bind mounts of Mac paths
(virtiofs),
--tmpfs,--mount,volumecommands; local volumes that bind a folder (driver_opts: {type: none, o: bind, device: /path}) - Images:
pull(withdocker logincredentials),push,tag,save,load,history,search,image prune,system df; amd64 images run through Rosetta,--platformhonoured - Private registries: Kiri's own
~/.kiri/daemon.jsontakes Docker'sinsecure-registries(hosts such asregistry.lan:5000, or networks such as10.0.0.0/8, reached with a self-signed certificate or plain HTTP: HTTPS without checking the certificate first, then HTTP) andregistry-mirrors(Docker Hub pull-through mirrors, tried in order, each over the scheme it is written with:http://straight over plain HTTP,https://never down to it, as in Docker). They apply topull,push,loginandbuild, only for the hosts listed, and an edit applies without a restart. Docker Hub is always reached directly over verified HTTPS, whatever the file lists or its name resolves to, and a registry on this machine (localhostor a loopback address; not a name under.localhost) is tried over HTTPS without a certificate check, then HTTP, as in Docker. Where Kiri is stricter than Docker: a network covers registries named by an address in it (10.1.2.3:5000), not host names that resolve into it (list those by name), and must be a private range or a small one (a /16 or longer for IPv4, /48 for IPv6); a plain-HTTP (http://) mirror is used only when its host is listed as insecure too; a pull signed in to Docker Hub asks the mirrors only for official (library/) images; a mirror that fails mid-pull, or serves an image for another platform, hands the pull to the next mirror and then Docker Hub, and an image a mirror served records which; a plain-HTTP token service is asked only on the registry's own host and port; and no redirect goes from HTTPS down to plain HTTP except to a listed host. BuildKit's settings name hosts, not networks, so a network reachesdocker buildfor a registry once an image from it has been pulled (until then such aFROMfails rather than going unchecked): pull from a new registry in a listed network once, or list it by name. The lists, like Kiri's other settings, are changed from this machine (the window,kiri registryor the file). Containers can't change Kiri's settings through the engine's API, even with its socket. As with Docker, a container you give writable host folders can change your files there, Kiri's settings among them, and a container that can create containers with--privileged,--pid=host,SYS_ADMIN,--deviceor a mount of the host's root is as good as root on this machine. A daemon.json larger than 256 KiB, or not a regular file, is ignored, and at most 256 hosts and 16 mirrors are read. Settings → Registries andkiri registry insecure|mirror add|removeedit the same file; Docker Desktop's daemon.json is never read or changed. A registry with a self-signed certificate is reached only once it is listed, as with Docker - Builds:
docker build/buildx buildthrough BuildKit running in a Kiri container (buildx's docker-container driver), stopped when idle;--platformfor one platform at a time; on Apple silicon, amd64 build steps run through Rosetta too - Vulnerability scanning:
kiri scan <image>(or an image's Security tab in the window) finds known CVEs in an image with Grype, on Mac, Windows and Linux — also what every build's page shows. Nothing leaves your machine: Grype reads the image through an OCI layout of Kiri's own store, and the first scan downloads Grype and its database (about 230 MB, 3 GB unpacked), kept for every scan after. The last 20 scans of an image are kept, with--historyand--json, and finding descriptions link their advisories - Compose:
up(with--buildand--wait),down,ps,logs,exec,build:, healthchecks,depends_onconditions (service_healthy,service_completed_successfully),platform:, multiple networks, events - USB devices (beta): the USB tab hands a device (a serial adapter, a
Zigbee stick, a development board) to your containers on Mac, Windows and
Linux, and shows where it is inside Linux with the
--deviceline to copy. On a Mac, a device that drops off the bus while attached (the board resets, or the Mac sleeps) is attached again when it comes back - Mac integration: container files at
~/Kiriin Finder (read-only NFS, always current), SSH agent forwarding at/run/host-services/ssh-auth.sock - Memory: a balloon gives unused memory back while running, and the VM sleeps after 60 s idle (the daemon stays at ~15 MB; waking takes ~0.15 s)
- The window: containers, images, volumes and networks, with Compose
projects grouped (start, stop, restart or remove a whole project); each
container has its own page with details, live logs (find, level filter),
a command line (and "Open in Terminal" for a full shell) and its files
(preview, Save to Downloads, Show in Finder); Settings for fonts, text
size, starting at sign-in, stopping the engine when Kiri quits, the VM's
CPUs, memory and disk image size (
~/.kiri/vm.json, used from the VM's next start;KIRI_CPUS,KIRI_MEMORY_MIBandKIRI_DISK_GBoverride it; the disk grows online on boot and never shrinks) and local names - Menu bar: Kiri stays in the menu bar (or the tray on Windows and Linux) when its window closes, with the VM's state, running containers (click one to open it) and Start/Stop; Settings → Appearance → Closing the window can either keep the window hidden or free its page's memory until opened again
- Kubernetes:
kiri k8s start— a single-node k3s cluster in one container, ready in ~20 s, as thekirikubectl context - Linux machines:
kiri machine create dev --distro ubuntuandkiri machine shell dev— your user, sudo, and/Usersat the same path - The app:
cargo xtask appbuildsKiri.appwith thedockerCLI, Compose and buildx inside; opening it runskiri setup(docker context, LaunchAgent, build builder) and the window;kiri updateinstalls new releases after checking their SHA-256 and signature - Linux hosts: the same
kiriwith no VM — the agent runs on the host's kernel (cargo xtask linux,contrib/linux/kiri.service); arm64 and x86-64;tests/linux-host.shchecks it. Packaged as.deband.rpm(packaging/linux):kiriwith the docker CLI, Compose and buildx, orkiri-litefor the engine alone. Membership of thekirigroup is root-equivalent, exactly like thedockergroup - Windows: the x86-64 Linux build in a WSL2 distro, and
kiri-win.exe, which serves the API onnpipe:////./pipe/kiri(thekiridocker context) and carries it into WSL over onewsl.exe … kiri bridge, so it needs no change to WSL's or Windows' network settings (cargo xtask msibuildstarget/Kiri-<version>-x86_64.msi, a per-user installer aroundtarget/kiri-windows-x86_64;kiri.ps1in that folder installs the same without an MSI). Not TCP: WSL's localhost relay drops half-closes, anddocker runloses its output. Settings → Resources → WSL integration exposes per-distro engine sockets under/mnt/wsl/kiri/sockets/<distro>/docker.sock(linked from/var/run/docker.sockand akiriDocker context when nodockerdis running in that distro) and translates bind mounts from each enabled WSL 2 distro's Linux filesystem through/mnt/wsl/kiri/roots/<distro>(off by default; Windows paths like\\wsl.localhost\<distro>\…work too)
Kubernetes LoadBalancer services are published on localhost, and
kiri machine create NAME --systemd boots systemd as the machine's init.
Releases
The app and DMGs are signed with a Developer ID and notarized. Releases and
the update feeds are at https://download.runkiri.com, and every file and
feed names its architecture: Kiri-<version>-arm64.dmg, Kiri-<version>-arm64.tar.gz
and latest-mac-arm64.json for Apple silicon (-x86_64 for Intel Macs),
Kiri-<version>-x86_64.msi / -arm64.msi with latest-windows-x86_64.json /
latest-windows-arm64.json for Windows. Each app reads only its own feed, and
each platform is published on its own. Two DMGs: Kiri-<version>-arm64.dmg
bundles the docker CLI, Compose and buildx; Kiri-Lite-<version>-arm64.dmg
(cargo xtask app-lite) leaves them out and downloads the same pinned
versions on first launch (crates/kiri/src/cli_pins.rs, checked by SHA-256)
unless the Mac already has a docker CLI.
Company certificates
Kiri trusts the root certificates of the operating system and the Mozilla set that Kiri bundles. This applies to pulls, pushes, docker login, the update check, CLI and grype downloads, and Kiri Share. A registry signed by a company root certificate works when the system trusts that certificate.
- macOS: Kiri reads the trust settings of the user, admin and system keychains. Mark the root certificate as trusted, for example:
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ca.pem - Linux: Kiri reads the system CA bundle, for example in
/etc/ssl/certs. - Windows: pulls run in the engine in WSL 2, away from the Windows certificate store, so the Kiri window copies the store into the engine: the root certificates of the current user (which include the machine's and those Group Policy adds) that the bundled set lacks, and the certificates in the Disallowed store (as well as bundled roots disabled for Server Authentication). It sends them when the engine starts and every minute while Kiri runs, and the engine keeps them for its next start. Kiri Share uses the Windows certificate store of the current user. Trust the company root certificate in Windows, for example
certutil -user -addstore Root ca.cer; pulls trust it within a minute.
A root certificate that an administrator distrusts stays distrusted, even though the bundled Mozilla set has it:
- macOS: "Never Trust" in the user or admin trust settings. Settings in the system domain are not read.
- Windows: the certificates in the Disallowed store (and bundled roots disabled for Server Authentication in
ROOT), for Kiri Share and for pulls in the engine (only the engine in WSL accepts Windows roots, and only from Kiri on Windows; a native Linux engine, containers, and other WSL distros are refused). A re-issued copy of a distrusted self-issued root, with the same subject and public key, is distrusted too; a distrusted cross-certificate leaves the self-signed root it shares a key with trusted. - Linux: there is no list of distrusted certificates to read. A Mozilla root certificate that you remove from the system bundle (for example with
!in/etc/ca-certificates.conf) is still trusted through the bundled set.
Kiri does not check online revocation (CRL or OCSP).
NOTE: If SSL_CERT_FILE or SSL_CERT_DIR is set, Kiri reads the root certificates there instead of the system store, as OpenSSL does. The bundled Mozilla set stays in use, so these variables add root certificates and cannot limit trust to a private CA only. Kiri writes a warning when this occurs, and a company CA trusted in the keychain or system store is then not trusted.
If the system store causes a problem, set KIRI_TLS_ROOTS=webpki. Kiri then trusts only the bundled Mozilla set, as before: nothing is read from the system, so the roots an administrator distrusted are trusted again too. The Kiri app and the daemon do not read your shell environment; set the variable for them and restart Kiri:
- macOS:
launchctl setenv KIRI_TLS_ROOTS webpki - Linux:
sudo systemctl edit kiri, addEnvironment=KIRI_TLS_ROOTS=webpkiunder[Service], thensudo systemctl restart kiri.
To trust a private certificate authority at a Kiri Share edge only, set KIRI_SHARE_CA to a PEM file of extra root certificates. Kiri adds them to the trusted roots for that edge only; a file that does not parse is an error, not a silent skip.
Known issues
-
Mac: an attached USB device leaves your containers while the Mac sleeps. macOS takes USB devices off the bus when it sleeps, so a device such as
/dev/ttyACM0is gone from containers until the Mac wakes. Kiri then attaches it again by itself. Kiri doesn't keep the Mac awake for a device, since that would drain a laptop's battery. For a long job that runs unattended (flashing boards, logging a serial port), keep the Mac awake while it runs:caffeinate -sin a terminal (on power), or turn on "Prevent automatic sleeping when the display is off" in System Settings (Battery › Options on a laptop, Energy on a desktop Mac). -
docker build --add-host name:host-gatewaywith BuildKit fails withhost-gateway is not supported by the docker-container driver. buildx refuseshost-gatewayfor every builder except Docker's built-in one, and Kiri's builder is a docker-container builder, so the build stops before Kiri sees it. Docker's own docker-container builders do the same. Until Kiri has a built-in builder (planned), use the address itself (--add-host name:172.18.0.1on Windows and Linux, the default bridge's gateway;198.19.248.254on a Mac) orDOCKER_BUILDKIT=0, where Kiri mapshost-gatewayitself. -
docker build --platform linux/amd64,linux/arm64fails withdocker exporter does not currently support exporting manifest lists: Kiri's builder loads one platform into Kiri per build. Build each platform with its own--platform, or write all of them to an OCI archive with-o type=oci,dest=image.tar(Kiri'sdocker loaddoes not read OCI archives). -
A build that cannot reach a registry says
not found. When BuildKit cannot reach the registry (for example, no DNS in the builder), a base image from a registry fails withfailed to resolve source metadata for docker.io/library/alpine:3.15: docker.io/library/alpine:3.15: not found, even ifdocker pullalready fetched that tag or digest (FROM alpine:3.13@sha256:...). Kiri's builder asks Kiri's image mirror first; the mirror serves only images no registry has (built, loaded, committed, or tagged into another repository) and answers 404 for registry tags and digests so BuildKit resolves them from the registry. When the registry then can't be reached, BuildKit reports the mirror's "not found" instead of the network error. A docker-container builder with no mirror shows the real cause (dial tcp: lookup registry-1.docker.io ...). The builder runs on the default bridge, so check from a container there:docker run --rm alpine nslookup registry-1.docker.io.