容器:苹果的Linux容器运行时
Container: Apple's Linux-Container Runtime

原始链接: https://github.com/apple/container

`container` 是一款轻量级的适用于苹果硅芯片Mac的虚拟化工具,允许用户创建和运行Linux容器,其作用类似于轻量级的虚拟机。它使用Swift构建,并利用Containerization Swift软件包,遵循OCI标准,能够兼容任何标准容器注册表,从而实现镜像的拉取、运行和推送。 安装需要从GitHub发布页面下载并运行签名的安装包,并在提示时提供管理员权限。卸载可以使用`uninstall-container.sh`脚本,该脚本提供两种选项:删除所有用户数据(`-d`)或保留用户数据(`-k`)以便将来重新安装。 虽然兼容macOS 15,但`container`针对macOS 26 Beta 1进行了优化,macOS 15的特定问题可能不会得到解决。macOS 15也存在网络限制。欢迎贡献代码,请遵循贡献指南中的说明。

Apple has released "Container," a command-line tool for running OCI-compatible (Docker) containers on macOS using lightweight VMs built with their Virtualization.framework. This contrasts with "Containerization," a separate Swift framework for packaging containers within macOS apps. The release sparks discussion about alternatives like Lima and Colima for managing Linux VMs and Docker on macOS, with some users finding VMware Fusion's UI preferable. Debate arises about Swift's suitability as a Rust alternative, noting Swift's simpler syntax but potential performance limitations due to reference counting. Swift's ABI stability is highlighted as a strength, particularly for Apple's ecosystem. Users also question if "Container" can integrate with Docker for improved performance and whether it will extend container support to iOS App Store apps. The command-line tool abstracts away the complexity of VM setup. Some find it similar to Lima for running Linux VMs and are exploring potential replacement. Concerns are raised about Apple's choice of a generic name like "Container".
相关文章

原文

container is a tool that you can use to create and run Linux containers as lightweight virtual machines on your Mac. It's written in Swift, and optimized for Apple silicon.

The tool consumes and produces OCI-compliant container images, so you can pull and run images from any standard container registry. You can push images that you build to those registries as well, and run the images in any other OCI-compliant application.

container uses the Containerization Swift package for low level container, image, and process management.

introductory movie showing some basic commands

You need an Apple silicon Mac to run container. To build it, see the BUILDING document.

container relies on the new features and enhancements present in the macOS 26 Beta 1. You can run the tool on macOS 15, but the container maintainers typically will not address issues discovered on macOS 15 that cannot be reproduced on the macOS 26 Beta 1.

There are significant networking limitations that impact the usability of container on macOS 15.

If you're upgrading, first uninstall your existing container while preserving your user data:

uninstall-container.sh -k

Download the latest signed installer package for container from the GitHub release page.

To install the tool, double click the package file and follow the instructions. Enter your administrator password when prompted, to give the installer permission to place the installed files under /usr/local.

Use the uninstall-container.sh script to remove container from your system. To remove your user data along with the tool, run:

uninstall-container.sh -d

To retain your user data so that it is available should you reinstall later, run:

uninstall-container.sh -k

Contributions to container are welcomed and encouraged. Please see our main contributing guide for more information.

联系我们 contact @ memedata.com