`container run` and `container create` infer os, arch, and runtime
from the image's OCI index, or manifest + config.
Runtime defaults to `container-runtime-<os>` unless `--runtime` is set.
Adds an `imagePlatforms` images service route and bumps
containerization to 0.53.0.
- Fixes#1876.
- Encode forwarded process signals as signal
names instead of integer XPC values.
- Preserve Darwin-to-Linux signal semantics for
foreground signal forwarding.
- Add coverage for the kill request payload and
forwarded INT, TERM, WINCH, USR1, and USR2
mappings.
- `BuildFSSync.read()` and `info()` resolved a
requested path, checked that the result was
inside the build context, and then opened the
original path. A symlink replaced between the
check and the open was followed to its new
target, which could be outside the context.
-This change opens each requested file by
walking its path one component at a time from
a directory descriptor pinned on the context
root, using `FileDescriptorOps` from
`containerization`. Symlinks are followed only
when the target is relative and stays beneath
the context root. The metadata and the content
returned to the builder both come from the
same open descriptor.
- Behavior change: a symlink with an absolute
target is now rejected by `read()` and `info()`,
even when the target is inside the context.
Relative symlinks that stay inside the context
still work. `walk()`-based transfers are unchanged.
- Dependency: Requires `containerization` 0.50.0
for its `FileDescriptorOps` API enhancements.
This change updates the library from 0.52.0
to 0.52.1.
- Closes#2374.
- `container logs -f` exits when its initial read
finds an empty log. Skip the empty initial read
without returning, so follow mode can wait for
new output.
- Keep the full-file read to preserve existing
output before following.
- Add a regression test for output appended to
an initially empty log.
- Leave container machine logs unchanged
because it has a separate implementation and
this issue concerns container logs.
- Fixes#2392.
- `ContainersService.logs(id:)` opened `stdio.log` and
`vminitd.log` eagerly, so either one missing failed the
whole request. Both are created by `RuntimeLinux` at
bootstrap, so a container that has never been started
has neither. And only `RuntimeLinux` writes
`vminitd.log`, so with another runtime plugin even
plain `container logs` failed.
- A missing log now reads as empty: it's opened as
`/dev/null`, with a debug log line. Any other failure
to open a log still throws.
Co-authored-by: Bryan Mosley <342731628+bryanmosley@users.noreply.github.com>
- 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.
- 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>
- `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>
- 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.
- 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.
- 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.
- 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>
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>
- 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>
This removes the AsyncParsableCommand protocol from ContainerCLI since
it does not leverage the features that the protocol provides and the
extension main can cause confusion.
Bump to latest containerization version.