314 Commits
Author SHA1 Message Date
J Logan b3eb70307a Add DNS aliases and subtree aliases for container network attachments (#2390)
- Closes #457.
- A container can now declare additional DNS names for
  a network attachment with a repeatable `alias` property
  on `--network`, including subtree aliases that match
  every name below a domain.
- With the default domain `test`, this container answers
  to `gateway.test` by its name, to `api.test` by the exact
  alias, and to `web.gateway.test`, `a.b.gateway.test`
  and every other name below `gateway.test` by the
  subtree alias. The motivating case is a gateway container
  in front of a local Kubernetes cluster that answers for
  `*.gateway.test`, with an ingress controller routing on
  the `Host` header.
- An alias is an exact name, or a name with a leading
  dot that matches every name below it. A name without
  a dot gets the default domain, as container names do.
  A subtree alias must be below a name the same
  attachment owns, and exact names are unique across
  all containers, so a container cannot claim another
  container's namespace. The rules for one attachment
  are checked when a container is created, again when
  a stored container starts, and again by the network
  helper when it registers the aliases. See
  `docs/architecture/dns.md` for the design, the
  invariants and the security considerations.
2026-10-14 10:11:00 -07:00
Dmitry Kovba c3fea8c3d9 Fix built image loading, create command output, and help text in the Kubernetes plugin (#2369) 2026-10-13 15:22:50 -07:00
Kathryn Baldauf aa8b830745 K8s image load fix fqn tagging (#2384)
- The k8s load-image CLI command will issue a
  ctr image tag command in the guest to make
  the fully qualified name of an image available
  when the image has a short name (such as
  when building and testing locally). The ordering 
  of fully qualified name and source image name
  was backwards, causing the command to
  silently fail.

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
2026-10-12 16:51:56 -07:00
J Logan 7f3697804f Fix container image load for sparse images. (#2385)
- Fixes #2383.
- Bumps containerization to 0.50.0 to pick up
  apple/container#961 upon which this fix depends.
2026-10-12 16:31:01 -07:00
J Logan 48f902dc66 CLI test: sync disk after file remove and before clean. (#2366) 2026-10-08 11:20:36 -07:00
jwhur 763aea5bf0 Extract container build and container builder as a CLI plugin (#2298) 2026-10-08 11:14:49 -07:00
Kathryn Baldauf 6fe55561fd Add support for multi node k8s clusters (#2276)
Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
2026-10-06 09:52:58 -07:00
Renlord Yang 175e493a6f Fix container system status false negative under a Seatbelt sandbox. (#2316)
- `launchctl list` does not work as expected in the sandbox.
- Probe with `launchctl print <domain>/<label>` instead,
  which launchd does allow a sandboxed process, and key
  off exit codes: 0 means registered, 113 (ENOSERVICE)
  means not registered, and anything else is an error rather
  than being mistranslated into a negative.
- The probe is advisory in `system status`, so an indeterminate
  answer falls through to the XPC health check, whose success 
  is authoritative.

Signed-off-by: Renlord Yang <renlord@apple.com>
2026-10-05 15:52:37 -07:00
Hokila Jan 38fe2f9a4b Skip unreadable entries in image list (#2157)
- Fixes #2149.
- `container image list` currently fails completely when
  one image record references an unreadable or missing
  content blob. Healthy images are not rendered, and
  structured output such as JSON and YAML is unavailable.
- This PR resolves each image independently:
  - healthy images remain visible;
  - unreadable images are reported as warnings;
  - warnings are written to stderr;
  - structured stdout remains valid;
  - the command exits non-zero after rendering a
    partial listing, so automation can detect it.
2026-10-02 13:18:04 -07:00
J Logan 0a48a1bdbf Remove machine user extension points, update machine docs. (#2322)
- Closes #2321.
- Removes image script and ORAS resource extension
  point handling for container machine user setup.
- Replaces image script resource with hardcoded script.
- Adds more flexible user setup options to
  `container machine`.
- Updates container machine documentation to clearly
  identify convenience-isolation tradeoffs.
2026-09-30 16:57:10 -07:00
Kathryn Baldauf 2ef8aef92a K8s plugin: support no CNI on create (#2277)
Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
2026-09-30 15:57:41 -07:00
Hokila Jan dbd5ca0840 Fix k8s list grouping for dual-role control-plane nodes (#2315) 2026-09-29 19:17:13 -07:00
Saehej Kang d5023f4071 [container]: add commit command (#1762)
- Closes #1399.
2026-09-29 14:40:40 -07:00
Hashim Khan f7a75fb9a8 Stop importing Testing from ContainerTestSupport (#2118) 2026-09-29 11:20:32 -07:00
Raj d265d669ec Update plugin error test (#2313) 2026-09-28 16:28:39 -07:00
Kathryn Baldauf 31a069a1c9 K8s Plugin: sanitize kubeconfig values from guest before merging with host kubeconfig (#2310)
Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
2026-09-28 14:47:39 -07:00
Daniel Syauqi dc276ee5f3 Run commands when image entrypoint is empty (#2296) 2026-09-22 16:36:20 -07:00
jwhur 09d8e6aeea Fix Globber dropping directory contents under a symlinked ancestor (#2252) 2026-09-21 14:01:26 -07:00
Di Warachet S. 4e7dce66ad fix(k8s): correct k8s control plane components version using the user specified node image version (#2271) 2026-09-18 12:45:06 -07:00
Kathryn Baldauf 57f0b9392b K8s plugin: Support custom CNI manifest (#2254)
Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
2026-09-15 09:36:17 -07:00
Raj b61450b6e8 Fix container egress loss after localhost DNS changes (#2256) 2026-09-10 19:00:07 -07:00
Dmitry Kovba d5c31e98a2 Fix a compilation warning (#2251) 2026-09-10 17:34:33 -07:00
Di Warachet S. c82fe3c4be fix: handle container clean failing on read-only named volume mounts (#2228)
- Skips the rootfs when the container was created with
  `--read-only`, and skips block mounts whose options
  include `ro`.
- Keeps trimming the remaining targets after a failure,
  then throws one error listing each failed path with its
  underlying error.
2026-09-02 15:46:16 -07:00
Saehej Kang b8ffd38c73 [container]: add clean command (#1949)
- Closes #1763
- `container clean` marks deallocated filesystem blocks
  in the container VM so that the host can reclaim the
  unused capacity.
2026-09-01 11:32:31 -07:00
muk2andClaude Opus 4.8 d925dab865 Enhance container system status command output (#1769)
- Fixes #815.
- Relocates the API server info received from the health check
  XPC to a `server` property.
- Fixes the server `version` property in the health check result
  to contain only the version; previously it included text that was
  already in sibling properties. 
- Adds properties for host, client, paths, and resources.
- Adds these properties to the output of `container system status`,
  in a table or as JSON (`--format json`). Daemon-sourced fields
  populate only when the API server responds, so the command
  degrades gracefully to a "server not running" view when the
  daemon is stopped. System configuration values are not repeated
 here — `container system property ls` already reports them.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-30 12:56:09 -07:00
Talandtaljeon d65874da36 Avoid escaping slashes in JSON output (#2205)
Fixes #2204.

Swift's default JSONEncoder output escapes forward slashes, which makes CLI JSON paths and URLs harder to read and copy. This change makes the shared CLI JSON renderer always use .withoutEscapingSlashes and routes machine list --format json through that renderer while preserving its ISO-8601 date encoding.

OpenAI Codex assisted with investigation, implementation, and verification. The final change is limited to JSON rendering behavior and focused regression coverage.

Co-authored-by: taljeon <169621860+taljeon@users.noreply.github.com>
2026-08-28 16:37:33 -07:00
Kathryn Baldauf a9a62e28f6 Update to containerization 0.42.0 (#2207)
Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
2026-08-28 15:38:56 -07:00
Siva Sathwik Kommi 388d964f38 Fix tmpfs mount source field left empty for --mount type=tmpfs (#2138) 2026-08-26 20:53:28 -07:00
Agam Dua d6de569420 Update default kernel to Kata Containers 3.32.0 debug build (#2143)
- Switch the default guest kernel from vmlinux-6.18.15-186
  (kata-static-3.28.0) to the newer version and variant
  vmlinux-6.18.35-197-debug (kata-static-3.32.0).
- The debug variant enables eBPF, kprobes, uprobes, ftrace
  and BTF (kata-containers/kata-containers#12567).

Signed-off-by: Agam Dua <agam_dua@apple.com>
2026-08-20 15:41:02 -07:00
Raj 04324afe63 Add identifier validation tests for the disk-usage routes (#2136) 2026-08-20 10:31:01 -07:00
Kathryn Baldauf 44374a237b Do not set default maskedPaths and readonlyPaths for container machines (#2137)
Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
2026-08-19 09:44:25 -07:00
jshi991andJohn Logan b3357fdb2e Split K8sHelper, add WorkerProvisioner protocol, and add LinuxWorker … (#2110)
- Closes #2102.
- LinuxWorkerProvisioner sets up a kind-based node.
- Includes some test cleanups.

Co-authored-by: John Logan <john_logan@apple.com>
2026-08-18 13:12:06 -07:00
J Logan d2213f49e6 Integration test: fix k8s test with scoped domain. (#2104) 2026-08-12 09:39:13 -07:00
J Logan 497465635a Remove auto registry scheme. (#2100) 2026-08-10 09:55:53 -07:00
Pradeep BiswasandJohn Logan f13b7238d5 Refactor tmpfsMounts() to process tmpfs path correctly (#2103)
Co-authored-by: John Logan <john_logan@apple.com>
2026-08-10 09:49:58 -07:00
Victor Manuel Puga RuizandClaude Sonnet 5 0190097d06 Migrate ProgressBarTests to Swift Testing (#2085)
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-07 15:17:54 -07:00
J Logan 0925ff6298 Refactor container k8s to use plugin resource management. (#2097) 2026-08-07 14:43:56 -07:00
jshi991 cec124f207 refactor: extract K8s logic into ContainerK8s library target (#2079)
- Closes #2078.
- Move all K8s sources from the container-k8s executable
  into a new ContainerK8s library target. Sources/Plugins/K8s/
  becomes a thin entry point (K8sMain.swift) that calls
  K8sCommand.main().
2026-08-07 10:08:16 -07:00
J Logan abff4183b4 Integration test: fix username/uid flake. (#2086) 2026-08-06 20:31:13 -07:00
jshi991 0d111be4c6 K8s plugin (#2044)
- closes #2043 
- introduces the k8s plugin, allowing users to make single
  node clusters with the kind base image 
- other functionality is included as well such as creation,
  deletion, and loading custom images
2026-08-05 19:25:27 -07:00
J Logan 60612eef51 Integration test: cache warmup image tarfiles. (#2074)
- When pulling warmup images for concurrent tests, save
  the images to a cache directory under the application root.
- Serial tests that aren't testing pull can save time by restoring
  a cached warmup image.
2026-08-05 11:17:20 -07:00
Aditya Ramani ddaf2ca5ac Add --read-only-path and --masked-path option to container run / create (#2069) 2026-08-04 19:04:50 -07:00
J Logan cb8cad4562 Add readiness signal to DirectoryWatcher, fix DirectoryWatcherTest. (#2066) 2026-08-04 12:17:58 -07:00
J Logan 520371cb38 Increase testExecDetachProcessRunning sleep margin to avoid CI flake (#2063) 2026-08-03 15:27:58 -07:00
jwhur 4ed47cbe33 Move SSH builder test to Serialized tests (#2061) 2026-08-03 12:16:23 -07:00
Saehej Kang e87d3a030b [builder]: enable ssh forwarding for container build (#1508) 2026-08-03 08:34:48 -07:00
Saehej Kang da8bec6223 [container]: add container export for live containers (#1630)
- When container is not running, the runtime helper
  traverses the container's root fs and writes it to the
  specified tar archive or stdout.
- When the container is running, the helper performs
  the same operation but wraps it in freeze/thaw
  to ensure data integrity for the resulting archive.
2026-08-02 14:55:01 -07:00
48145ac7fb Fix image env vars, build context checks, TCP/UDP port forward buffer, and validate plugin name (#2027)
Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
Co-authored-by: John Logan <john_logan@apple.com>
Co-authored-by: Raj Aryan Singh <rajaryan_singh@apple.com>
2026-07-28 10:13:10 -07:00
divyansh 13e976f88e fix: Increase XPC timeout for Machine API operations (#2006)
- Fixes #2003.
2026-07-27 13:49:18 -07:00
J Logan d1d763530d Fix BuilderStart race, parallelize container build tests. (#2002)
- Closes #2001.
- Handle "container exists" error gracefully instead
  of failing, when trying to start the buildkit container.
- Move build tests to parallel suites, while the builder
  lifecycle tests remain serial. Parallel builds don't
  use the fixture lock that deletes and restarts the
  builder and runs a build block in isolation.
2026-07-23 15:50:59 -07:00