Files
devvm/internal/cli
w3cjandClaude Opus 5.5 0aec2ece89 feat(from): base images from Docker and OCI images
--from IMAGE (default $DEVVM_FROM) starts base from a Debian-, Ubuntu-
or Alpine-based container image instead of Ubuntu's cloud image, for new
VMs, build and rebuild. base is keyed by the image's digest, looked up
once per build and recorded per reference; existing VMs keep their own
(from_ignored).

- internal/from: ParseRef (registry_ref, with a fuzz target), Valid/
  Check (bad_from), Pinned, Name, Recorded (from_digest), Registry.Digest
  (manifest HEAD, anonymous Bearer token from an https realm only,
  timeouts, size caps, retries; ErrUnreachable/ErrNotFound), Lookup.Refresh
  (refresh_from_digest: registry, else Docker's ID, else the recorded
  digest with a warning), DockerID, DockerRunning.
- build.Builder: From and Lookup; Inputs/Key/Chain with the recorded
  digest; spec.From for base; records keep from and digest on every image
  above a --from base; rebuild counters per from; building_image_from.
- lima: convert (oci_base): devvm-oci-build from Ubuntu's image with only
  <tmp>/vm (rw) and oci/ (ro) mounted, confined to the internet, runs
  oci/build.sh; docker save plus exportIs for images only Docker has;
  checkConverted (regular files, gnu/musl, cmdline charset, raw ext4);
  base created with --set .images (disk, kernel, cmdline, initrd); the
  temp folder, build VM and the OCI build lock (lockOCI, pid, stale
  takeover, oci_waiting) go however the run ends.
- cli/vm: global --from flag, state from=, builders with the VM's from in
  open, update, remove.
- Messages: building_image_from, bad_from, from_ignored, from_unreachable,
  from_not_found, from_cached_unreachable, from_cached_not_found,
  no_digest, docker_only, exporting_docker, docker_export_failed,
  docker_image_changed, oci_waiting, converting_in_vm, converting,
  convert_failed, convert_bad_output; doc links to from.md.
- Copied: oci/ (build.sh and README edited: comment, docs link),
  testdata/stubs/docker; limactl stub gains oci/build.sh outputs and
  interrupt-on.
- Converted: from.bats (registry_ref, registry_digest token, 1/2,
  https realm, refresh per tag, Docker-only, offline, no Docker, pinned,
  moved tag, cached keys, build flow, docker save, Ctrl+C, steps, failures,
  bad outputs, record, export check, lock) as Go tests and from.txtar;
  oci.bats (libc_for, missing architecture, crane pins) as oci.txtar;
  cli.bats --from parse_args and project.bats --from input checks.
- e2e: from section (--from tier, or --only from): node:24 Debian 12
  node+python+claude, alpine:3 musl tools and Docker on OpenRC, base from
  ubuntu:26.04, no Docker needed. Left out: features, an image only Docker
  has.
- Docs: from.md; images, commands, lima, contributing, index; CLI
  reference.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 13:23:29 -06:00
..
2026-10-24 03:11:14 -06:00
2026-10-24 09:50:15 -06:00