[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-6732":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},6732,"containerization","apple\u002Fcontainerization","apple","Containerization is a Swift package for running Linux containers on macOS.","https:\u002F\u002Fapple.github.io\u002Fcontainerization\u002Fdocumentation\u002F",null,"Swift",8640,290,36,28,0,24,75,110,121,38.39,"Apache License 2.0",false,"main",true,[],"2026-06-12 02:01:29","\u003Ch1>\n  \u003Cimg alt=\"Containerization logo\" src=\".\u002Fassets\u002FContainerization-Logo.png\" width=\"70\" valign=\"middle\">\n  &nbsp;Containerization\n\u003C\u002Fh1>\n\nThe Containerization package allows applications to use Linux containers.\nContainerization is written in [Swift](https:\u002F\u002Fwww.swift.org) and uses [Virtualization.framework](https:\u002F\u002Fdeveloper.apple.com\u002Fdocumentation\u002Fvirtualization) on Apple silicon.\n\n> **Looking for command line binaries for running containers?**\\\n> They are available in the dedicated [apple\u002Fcontainer](https:\u002F\u002Fgithub.com\u002Fapple\u002Fcontainer) repository.\n\nContainerization provides APIs to:\n\n- [Manage OCI images](.\u002FSources\u002FContainerizationOCI\u002F).\n- [Interact with remote registries](.\u002FSources\u002FContainerizationOCI\u002FClient\u002F).\n- [Create and populate ext4 file systems](.\u002FSources\u002FContainerizationEXT4\u002F).\n- [Interact with the Netlink socket family](.\u002FSources\u002FContainerizationNetlink\u002F).\n- [Create an optimized Linux kernel for fast boot times](.\u002Fkernel\u002F).\n- [Spawn lightweight virtual machines and manage the runtime environment](.\u002FSources\u002FContainerization\u002FLinuxContainer.swift).\n- [Spawn and interact with containerized processes](.\u002FSources\u002FContainerization\u002FLinuxProcess.swift).\n- Use Rosetta 2 for running linux\u002Famd64 containers on Apple silicon.\n\nPlease view the [API documentation](https:\u002F\u002Fapple.github.io\u002Fcontainerization\u002Fdocumentation\u002F) for information on the Swift packages that Containerization provides.\n\n## Design\n\nContainerization executes each Linux container inside of its own lightweight virtual machine. Clients can create dedicated IP addresses for every container to remove the need for individual port forwarding. Containers achieve sub-second start times using an optimized [Linux kernel configuration](\u002Fkernel) and a minimal root filesystem with a lightweight init system.\n\n[vminitd](\u002Fvminitd) is a small init system, which is a subproject within Containerization.\n`vminitd` is spawned as the initial process inside of the virtual machine and provides a GRPC API over vsock.\nThe API allows the runtime environment to be configured and containerized processes to be launched.\n`vminitd` provides I\u002FO, signals, and events to the calling process when a process is run.\n\n## Requirements\n\nTo build the Containerization package, you need:\n\n- Mac with Apple silicon\n- macOS 26\n- Xcode 26\n\nOlder versions of macOS are not supported. \n\n## Example Usage\n\nFor examples of how to use the libraries' API surface, the cctl executable is a good start. This app is a useful playground for exploring the API. It contains commands that exercise some of the core functionality of the various products, such as:\n\n1. [Manipulating OCI images](.\u002FSources\u002Fcctl\u002FImageCommand.swift)\n2. [Logging in to container registries](.\u002FSources\u002Fcctl\u002FLoginCommand.swift)\n3. [Creating root filesystem blocks](.\u002FSources\u002Fcctl\u002FRootfsCommand.swift)\n4. [Running simple Linux containers](.\u002FSources\u002Fcctl\u002FRunCommand.swift)\n\n## Linux kernel\n\nA Linux kernel is required for spawning lightweight virtual machines on macOS.\nContainerization provides an optimized kernel configuration located in the [kernel](.\u002Fkernel) directory.\n\nThis directory includes a containerized build environment to easily compile a kernel for use with Containerization.\n\nThe kernel configuration is a minimal set of features to support fast start times and a lightweight environment.\n\nWhile this configuration will work for the majority of workloads we understand that some will need extra features.\nTo solve this Containerization provides first class APIs to use different kernel configurations and versions on a per container basis.\nThis enables containers to be developed and validated across different kernel versions.\n\nSee the [README](\u002Fkernel\u002FREADME.md) in the kernel directory for instructions on how to compile the optimized kernel.\n\n### Kernel Support\n\nContainerization allows user provided kernels but tests functionality starting with kernel version `6.14.9`.\n\n### Pre-built Kernel\n\nIf you wish to consume a pre-built kernel, make sure it has `VIRTIO` drivers compiled into the kernel (not merely as modules).\n\nThe [Kata Containers](https:\u002F\u002Fgithub.com\u002Fkata-containers\u002Fkata-containers) project provides a Linux kernel that is optimized for containers, with all required configuration options enabled. The [releases](https:\u002F\u002Fgithub.com\u002Fkata-containers\u002Fkata-containers\u002Freleases\u002F) page contains downloadable artifacts, and the image itself (`vmlinux.container`) can be found in the `\u002Fopt\u002Fkata\u002Fshare\u002Fkata-containers\u002F` directory. \n\n## Prepare to build package\n\nInstall the recommended version of Xcode.\n\nSet the active developer directory to the installed Xcode (replace `\u003CPATH_TO_XCODE>`):\n```bash\nsudo xcode-select -s \u003CPATH_TO_XCODE>\n``` \n\nInstall [Swiftly](https:\u002F\u002Fgithub.com\u002Fswiftlang\u002Fswiftly), [Swift](https:\u002F\u002Fwww.swift.org), and [Static Linux SDK](https:\u002F\u002Fwww.swift.org\u002Fdocumentation\u002Farticles\u002Fstatic-linux-getting-started.html):\n\n```bash\nmake cross-prep\n```\n\nIf you use a custom terminal application, you may need to move this command from `.zprofile` to `.zshrc` (replace `\u003CUSERNAME>`):\n\n```bash\n# Added by swiftly\n. \"\u002FUsers\u002F\u003CUSERNAME>\u002F.swiftly\u002Fenv.sh\"\n```\n\nRestart the terminal application. Ensure this command returns `\u002FUsers\u002F\u003CUSERNAME>\u002F.swiftly\u002Fbin\u002Fswift` (replace `\u003CUSERNAME>`):\n\n```bash\nwhich swift\n```\n\nIf you've installed or used a Static Linux SDK previously, you may need to remove older SDK versions from the system (replace `\u003CSDK-ID>`):\n\n```bash\nswift sdk list\nswift sdk remove \u003CSDK-ID>\n```\n\n## Build the package\n\nBuild Containerization from sources:\n\n```bash\nmake all\n```\n\n## Test the package\n\nAfter building, run basic and integration tests:\n\n```bash\nmake test integration\n```\n\nA kernel is required to run integration tests.\nIf you do not have a kernel locally, a default kernel can be fetched using the `make fetch-default-kernel` target.\n\nFetching the default kernel only needs to happen after an initial build or after a `make clean`.\n\n```bash\nmake fetch-default-kernel\nmake all test integration\n```\n\n## Protobufs\n\nContainerization depends on specific versions of `grpc-swift` and `swift-protobuf`. You can install them and re-generate RPC interfaces with:\n\n```bash\nmake protos\n```\n\n## Building a kernel\n\nIf you'd like to build your own kernel please see the instructions in the [kernel directory](.\u002Fkernel\u002FREADME.md).\n\n## Pre-commit hook\n\nRun `make pre-commit` to install a pre-commit hook that ensures that your changes have correct formatting and license headers when you run `git commit`.\n\n## Documentation\n\nGenerate the API documentation for local viewing with:\n\n```bash\nmake docs\nmake serve-docs\n```\n\nPreview the documentation by running in another terminal:\n\n```bash\nopen http:\u002F\u002Flocalhost:8000\u002Fcontainerization\u002Fdocumentation\u002F\n```\n\n## Contributing\n\nContributions to Containerization are welcomed and encouraged. Please see [CONTRIBUTING.md](\u002FCONTRIBUTING.md) for more information.\n\n## Project Status\n\nVersion 0.1.0 is the first official release of Containerization. Earlier versions have no source stability guarantees.\n\nBecause the Containerization library is under active development, source stability is only guaranteed within minor versions (for example, between 0.1.1 and 0.1.2). If you don't want potentially source-breaking package updates, you can specify your package dependency using .upToNextMinorVersion(from: \"0.1.0\") instead.\n\nFuture minor versions of the package may introduce changes to these rules as needed.\n","Containerization 是一个用于在 macOS 上运行 Linux 容器的 Swift 包。它利用了 Apple silicon 的 Virtualization 框架，提供了一系列 API 以管理 OCI 镜像、与远程仓库交互、创建和填充 ext4 文件系统、优化 Linux 内核以实现快速启动，并通过轻量级虚拟机来运行容器化进程。此外，还支持使用 Rosetta 2 在 Apple silicon 上运行 linux\u002Famd64 容器。该项目适用于需要在 macOS 开发环境中直接测试或运行 Linux 容器的应用场景，特别适合那些希望简化跨平台开发流程的开发者。",2,"2026-06-11 03:08:35","top_language"]