kiri · open-source contribution to a Rust container runtime
Period — Present
Kiri is a lightweight Rust container runtime that runs Docker images and works with the Docker CLI on macOS, Windows and Linux. I contributed two fixes: help for the update command no longer checks for updates, and the API now validates restart policies the way Docker does. The maintainer refined both and merged them with me as co-author.
Fixes for a CLI that checked for updates when asked for help
and an API that stored restart policies Docker refuses
- Usage output and a clean exit for kiri update --help and -h, with no release lookup
- One restart-policy check shared by container create and update
- 400 for unknown policy names, negative retry counts and positive retry counts on policies other than on-failure
- 409, as in Docker, when restart is enabled on an AutoRemove container
- Nothing stored when a request is refused
- Unit tests and regression-list entries for both fixes
Help that checked for updates
- Problem
- Asking kiri update for help skipped the usage text and went straight to the release feed. An invalid update URL ended in an error, and a release build could download and install a newer version.
- Solution
- The command now checks for the help flags before any lookup, prints usage and exits, matching how kiri import handles its own help. With an invalid update URL, both help flags went from exiting with code 1 to printing usage and exiting with 0.
Restart policies Docker would refuse
- Problem
- Kiri accepted restart policies that Docker rejects with 400 or 409. An unknown policy named bogus was stored, a retry count of -1 still created a container, and a container started with --rm could be switched to always.
- Solution
- Create and update now share one validation. Invalid values return 400, enabling restart on an AutoRemove container returns 409, and a refused request stores nothing. Kiri matched Docker 29.8.2 on all three requests, returning 400, 400 and 409.