apple-container – skill DevOps & Hạ tầng cho agent AI
Xây dựng, chạy và quản lý container OCI/Linux dưới dạng máy ảo nhẹ riêng cho từng container trên macOS chip Apple silicon, dùng CLI container mã nguồn mở của Apple, không cần Docker daemon.
Cài skill apple-container bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/apple-container-2d88b.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /apple-container – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/apple-container-2d88b.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $apple-container – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/apple-container-2d88b.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /apple-container – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/apple-container-2d88b.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /apple-container – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
Apple container
> Reference scope: this imported guide mixes release-era and later branch documentation; its 1.0.0+ annotations are not verified introduction versions. Match the installed container --version and subcommand --help to the same upstream release tag before using flags or defaults. Current branch documentation can describe unreleased behavior. No container runtime was executed for this static review.
When to Use
- Use when building, running, or managing OCI/Linux containers on Apple-silicon macOS with Apple's open-source
containerCLI - Use when you want lightweight per-container VMs instead of a Docker daemon
- Use when translating Docker-style workflows (build, run, exec, logs, networking) to Apple's container tooling
Apple's container is an open-source CLI for building, running, and managing OCI/Linux
containers on Apple-silicon Macs. Each container runs inside its own lightweight virtual
machine (backed by the Containerization framework and the Virtualization API). A shared per-user
API server and helpers run via launchd, with a separate runtime helper per container. Images are standard OCI
artifacts, so they interoperate with Docker registries and other OCI tooling. The CLI is
deliberately Docker-like (container run, container build, and image ops under
container image push/pull), but it is a distinct tool: do not assume Docker command paths,
flags, defaults, or daemon behavior carry over (e.g. there is no container images/push/pull
top-level command — image verbs live under container image).
Safety Gate
Container installation, service startup, image pulls, builds, runs, registry login, pushes,
and resource cleanup change local or remote state. Keep the exact registry, mounts, ports, privileges and persistence impact within existing task authorization. Clarify missing destructive scope, sensitive mounts, credentials or external exposure before acting; do not ask again for actions already authorized.
Requirements
- Apple silicon only (M1 or later). Intel Macs are not supported.
- macOS 26 (Tahoe) is the officially supported target. The maintainers do not support
older macOS and typically will not fix issues that can't be reproduced on 26. The binary
still runs on macOS 15 (Sequoia) but with reduced networking: only the single default
subnet is available, and the container network group and --network flag error out.
macOS-26-gated features are called out throughout the reference files.
- Version: this skill documents the 1.0.0 release (the historical reference snapshot). The
machine
group, container cp, container export, container prune, container image prune,
container registry list, and container system version were added in 1.0.0 (not in 0.7.1)
— features that postdate 0.7.1 are flagged *(1.0.0+)* in the reference files. Run container --version and
container <group> --help to see what your installed build supports.
- Install by downloading the signed
.pkginstaller from the project's GitHub releases
(apple/container) and running it. See references/concepts.md for the full
requirements/compatibility matrix and how the VM-per-container model works.
Setup
Install the signed package, then start the background services once:
1. Download the latest signed installer .pkg from the
[GitHub releases page](https://github.com/apple/container/releases).
2. Double-click the downloaded package and follow the prompts, entering your admin
password so it can place files under /usr/local. For automated package installation, verify macOS installer syntax and package signature rather than inventing a container subcommand.
3. Start the services and confirm they are healthy:
# Start the container services (container-apiserver + helpers via launchd). On first run it
# offers to install the default Linux kernel — accept it, or start non-interactively with
# `--disable-kernel-install` and add a kernel later via `container system kernel set`.
container system start
# Verify services are healthy
container system statuscontainer system start must have run before any container/image/build command works — a
connection/XPC error can indicate stopped services, incompatible components, permissions or launch failures. Inspect container system status, installed versions and logs before deciding whether startup or repair is needed. Stop and
deregister the launchd services with container system stop (which takes only -p/--prefix).
The startup flags for container system start (-a/--app-root, --install-root, --log-root,
--enable-kernel-install/--disable-kernel-install, --timeout) are in
references/configuration.md.
Upgrade / downgrade / uninstall use helper scripts in /usr/local/bin (stop first with
container system stop): update-container.sh (add -v <version> to pin a version), and
uninstall-container.sh -d to remove user data or -k to keep it. Full recipes in
references/workflows.md.
Command groups at a glance
Invoke everything as container <group> <subcommand>. Container-lifecycle verbs (run,
create, start, stop, exec, logs, inspect, list/ls, delete/rm, kill,
stats) and build are top-level; image operations like push, pull, and tag live
under container image. Run container <group> --help for exact flags, or read
references/commands.md for the exhaustive matrix.
| Group | What it does | Example |
|-------|--------------|---------|
| container lifecycle | Create, start, run, stop, exec, inspect, list, remove containers | container run --rm -it docker.io/library/alpine sh |
| build | Build an OCI image from a Dockerfile in the builder VM | container build -t myapp:latest . |
| image | List, tag, inspect, remove, load/save, prune local images; push/pull to registries | container image ls |
| registry | Authenticate (login/logout/list) to OCI registries | container registry login ghcr.io |
| system | Start/stop/status services, logs, disk usage (df), DNS, kernel, properties | container system status |
| network | Create/list/remove container networks (macOS 26 only) | container network create mynet |
| volume | Create/list/inspect/remove persistent volumes | container volume create data |
| builder | Manage the builder VM that runs container build (start/stop/status) | container builder status |
| machine *(1.0.0+)* | Persistent Linux "machine" environments (added in 1.0.0) | container machine --help |
Exact subcommand names, aliases, arguments, and flags for each group live in
references/commands.md — consult it before running an unfamiliar command rather than
guessing Docker-equivalent syntax.
Navigating this skill
Read the reference file that matches the task; do not guess flags or behavior.
references/commands.md— exhaustive CLI reference: every command group, subcommand,
alias, argument, and flag. Read this to construct any concrete container ... invocation,
or to confirm a flag exists before using it.
references/concepts.md— architecture (VM-per-container, Containerization framework),
system requirements and macOS 15 vs 26 differences, networking model, per-container IPs,
security model, and a Docker-vs-container comparison. Read this to explain how or why
something works, or when a Docker mental model gives the wrong answer.
references/configuration.md— the system service,config.toml/ property model,
default kernel, DNS domains, default registry, builder resources, and machine settings.
Read this to change defaults, tune CPU/memory, point at a private registry, or manage the
kernel.
references/workflows.md— copy-pasteable task recipes (run an image, build & push,
wire up local DNS, mount a volume, expose ports) and troubleshooting for common failures.
Read this first when the user wants to accomplish a concrete end-to-end task.
Key rules
- This is not Docker. The CLI resembles Docker, but flags, defaults, and daemon behavior
differ. Verify syntax in references/commands.md instead of assuming Docker equivalence.
- Check service state when runtime operations need it. Inspect
container system status; start stopped services when the task authorizes it. Diagnose other failures rather than repeatedly starting or reinstalling. - Images are standard OCI artifacts and interoperate with Docker registries and other OCI
tools. Image references that omit a registry default to docker.io (configurable via the
registry.domain property — see references/configuration.md).
- Each container gets its own IP address on its network (one lightweight VM per
container). There is no shared Docker bridge; reach a container directly by its IP, or set
up a local DNS domain (container system dns create ..., admin required) for name-based
access.
- **
container networkrequires mac
… (nội dung đầy đủ có trong gói tải về)
Skill liên quan
- hunt-firebase – Săn khai thác Firebase / Firestore / GCP — phát hiện API key Firebase trong bundle JS…
- argocd-gitops – Triển khai GitOps với ArgoCD cho việc triển khai Kubernetes theo kiểu khai báo.
- arm-templates – Triển khai tài nguyên Azure bằng ARM template và Bicep. Tạo triển khai theo module và…
- asset-inventory – Duy trì kho tài sản CNTT và cơ sở dữ liệu quản lý cấu hình (CMDB). Theo dõi phần cứng…
- ginkgo-cloud-lab – Hướng dẫn chọn giao thức, chuẩn bị đầu vào, kiểm tra giá và đặt hàng qua trình duyệt…
- atlas-cloud-media – Tạo ảnh và video Atlas Cloud qua API media bất đồng bộ, với việc chọn model theo schema…
- gitlab-ci-patterns – Xây dựng pipeline CI/CD GitLab với quy trình nhiều giai đoạn, caching và runner phân tán…
- gitops-workflow – Triển khai quy trình GitOps với ArgoCD và Flux để triển khai Kubernetes tự động, khai…