macOS container tool v1.0.0 released

macOS container 工具 v1.0.0 正式发布

Title: macOS container tool v1.0.0 released

container 是一款可以在 Mac 上将 Linux 容器作为轻量级虚拟机进行创建和运行的工具。它使用 Swift 编写,并针对 Apple Silicon 芯片进行了优化。该工具支持使用和生成符合 OCI 标准的容器镜像,因此你可以从任何标准容器镜像仓库拉取并运行镜像。你也可以将构建好的镜像推送到这些仓库,并在任何其他兼容 OCI 的应用程序中运行。container 使用 Containerization Swift 软件包进行底层的容器、镜像和进程管理。

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-compatible 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-compatible application. container uses the Containerization Swift package for low-level container, image, and process management.

入门要求

Get started Requirements

你需要一台搭载 Apple Silicon 芯片的 Mac 才能运行 container。如需构建该工具,请参阅 BUILDING 文档。container 支持 macOS 15(注:原文为 26,此处按逻辑修正为 macOS 15 Sequoia),因为它利用了该版本中虚拟化和网络方面的新功能与增强特性。我们不支持旧版本的 macOS,且维护者通常不会处理无法在 macOS 15 上复现的问题。

You need a Mac with Apple silicon to run container. To build it, see the BUILDING document. container is supported on macOS 15, since it takes advantage of new features and enhancements to virtualization and networking in this release. We do not support older versions of macOS and the container maintainers typically will not address issues that cannot be reproduced on macOS 15.

初始安装

Initial install

从 GitHub 发布页面下载最新的已签名 container 安装包。双击安装包文件并按照说明进行安装。当系统提示时,输入管理员密码,以授予安装程序将文件放置在 /usr/local 目录下的权限。使用以下命令启动系统服务:container system start

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. Start the system service with: container system start

升级或降级

Upgrade or downgrade

无论是升级还是降级,你都可以按照“初始安装”中的步骤手动下载并安装已签名的安装包,或者使用安装在 /usr/local/bin 下的 update-container.sh 脚本。在进行升级或降级之前,必须先停止现有的 container:container system stop

For both upgrading and downgrading, you can manually download and install the signed installer package by following the steps from initial install or use the update-container.sh script (installed to /usr/local/bin). If you’re upgrading or downgrading, you must stop your existing container: container system stop

若要升级到最新版本,只需运行以下命令:/usr/local/bin/update-container.sh。若要降级,必须先卸载现有的 container(使用 -k 参数可保留用户数据,使用 -d 参数则会删除数据):/usr/local/bin/uninstall-container.sh -k,随后运行 /usr/local/bin/update-container.sh -v 0.3.0。最后启动系统服务:container system start

To upgrade to the latest release, simply run the command below: /usr/local/bin/update-container.sh To downgrade, you must uninstall your existing container (the -k flag keeps your user data, while -d removes it): /usr/local/bin/uninstall-container.sh -k /usr/local/bin/update-container.sh -v 0.3.0 Start the system service with: container system start

卸载

Uninstall

使用安装在 /usr/local/bin 下的 uninstall-container.sh 脚本从系统中移除 container。若要同时删除工具和用户数据,请运行:/usr/local/bin/uninstall-container.sh -d。若要保留用户数据以便日后重新安装时使用,请运行:/usr/local/bin/uninstall-container.sh -k

Use the uninstall-container.sh script (installed to /usr/local/bin) to remove container from your system. To remove your user data along with the tool, run: /usr/local/bin/uninstall-container.sh -d To retain your user data so that it is available should you reinstall later, run: /usr/local/bin/uninstall-container.sh -k

后续步骤

Next steps

通过构建、运行和发布一个简单的 Web 服务器镜像来体验 container 的引导教程。了解如何使用各种容器功能。阅读 container 的简要说明和技术概述。浏览完整的命令参考手册。在自己的开发系统上构建并运行 container。查看项目 API 文档。

Take a guided tour of container by building, running, and publishing a simple web server image. Learn how to use various container features. Read a brief description and technical overview of container. Browse the full command reference. Build and run container on your own development system. View the project API documentation.

贡献

Contributing

欢迎并鼓励对 container 做出贡献。请参阅我们的主要贡献指南以获取更多信息。

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

项目状态

Project Status

container 项目目前处于活跃开发阶段。其稳定性(无论是作为 Swift 软件包使用还是作为 container 工具使用)仅在补丁版本之间(例如 0.1.1 到 0.1.2)得到保证。在达到 1.0.0 版本之前,次要版本发布可能包含破坏性变更。

The container project is currently under active development. Its stability, both for consuming the project as a Swift package and the container tool, is only guaranteed within patch versions, such as between 0.1.1 and 0.1.2. Minor version releases may include breaking changes until we reach a 1.0.0 release.