Google 推出的 Container-Optimized OS 是适用于 Compute Engine 虚拟机的操作系统映像,专为运行容器而优化。
Container-Optimized OS 由 Google 维护,基于 Chromium OS 开放源代码项目。借助 Container-Optimized OS,您可以快速、高效、安全地在 Google Cloud Platform 上启动容器。
特性和优势
Container-Optimized OS 具有以下优点:
开箱即用地运行容器:Container-Optimized OS 实例预装 Docker 和 containerd 运行时以及 cloud-init。借助 Container-Optimized OS 实例,您可以在创建虚拟机的同时启动容器,而不需要在主机上执行设置。
较小的攻击面:Container-Optimized OS 占用空间较少,从而缩小了实例的潜在受攻击面。
默认锁定:默认情况下,Container-Optimized OS 实例包含锁定的防火墙和其他安全设置。
自动更新:Container-Optimized OS 实例配置为在后台自动下载每周更新;只需重新启动即可使用最新更新。
限制
Container-Optimized OS 对于您在其他操作系统上惯用的一些常见功能可能支持有限或者不提供相关支持。
ontainer-Optimized OS 不包含程序包管理器;因此,您无法直接在实例上安装程序包。但您可以使用 CoreOS 工具箱在隔离的容器中安装和运行调试和管理员工具。
Container-Optimized OS 不支持执行非容器化应用。
Container-Optimized OS 的内核处于锁定状态;您无法安装第三方内核模块或驱动程序。
Container-Optimized OS 仅在 Google Cloud Platform 环境内受支持。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[[["\u003cp\u003eContainer-Optimized OS is a Google-maintained operating system image for Compute Engine VMs, specifically designed for running containers efficiently and securely.\u003c/p\u003e\n"],["\u003cp\u003eThis OS comes pre-installed with Docker, containerd runtimes, and \u003ccode\u003ecloud-init\u003c/code\u003e, allowing users to deploy containers concurrently with VM creation, without needing additional on-host configurations.\u003c/p\u003e\n"],["\u003cp\u003eContainer-Optimized OS is security-focused, featuring a smaller attack surface, a locked-down firewall, and weekly automatic background updates.\u003c/p\u003e\n"],["\u003cp\u003eWhile optimized for containers and Kubernetes, Container-Optimized OS has limitations, including the absence of a package manager, no support for non-containerized applications, and the inability to install third-party kernel modules.\u003c/p\u003e\n"],["\u003cp\u003eContainer-Optimized OS is the default OS for Kubernetes Engine and other deployments on the Google Cloud platform, but may not be suitable for applications that require custom kernel modules, non-containerized applications, or professional Linux provider support.\u003c/p\u003e\n"]]],[],null,["# Container-Optimized OS Overview\n\nContainer-Optimized OS from Google is an operating system image for your\n[Compute Engine](/compute) VMs that is optimized for running containers.\nContainer-Optimized OS is maintained by Google and based on the open source\nChromium OS project. With Container-Optimized OS, you can bring up your\ncontainers on Google Cloud Platform quickly, efficiently, and securely.\n\nFeatures and Benefits\n---------------------\n\nContainer-Optimized OS provides the following benefits:\n\n- **Run Containers Out of the Box** : Container-Optimized OS instances come pre-installed with the Docker and containerd runtimes and `cloud-init`. With a Container-Optimized OS instance, you can bring up your container at the same time you create your VM, with no on-host setup required.\n- **Smaller attack surface**: Container-Optimized OS has a smaller footprint, reducing your instance's potential attack surface.\n- **Locked-down by default**: Container-Optimized OS instances include a locked-down firewall and other security settings by default.\n- **Automatic Updates**: Container-Optimized OS instances are configured to automatically download weekly updates in the background; only a reboot is necessary to use the latest updates.\n\nLimitations\n-----------\n\nContainer-Optimized OS has limited or no support for some of the common\nfeatures you may be familiar with on other operating systems:\n\n- Container-Optimized OS does not include a package manager; as such, you'll be unable to install software packages directly on an instance. However, you can use [CoreOS toolbox](/container-optimized-os/docs/how-to/toolbox) to install and run debugging and admin tools in an isolated container.\n- Container-Optimized OS does not support execution of non-containerized applications.\n- The Container-Optimized OS kernel is locked down; you'll be unable to install third-party kernel modules or drivers.\n- Container-Optimized OS is not supported outside of the Google Cloud Platform environment.\n\nUsing Container-Optimized OS\n----------------------------\n\nContainer-Optimized OS is the default node OS Image in [Kubernetes Engine](/kubernetes-engine) and\nother [Kubernetes](https://kubernetes.io/) deployments on Google Cloud Platform. See the [Kubernetes\nEngine Quickstart](/kubernetes-engine/docs/deploy-app-cluster) for more information on using Container-Optimized OS with\nKubernetes Engine.\n\nYou can also use Container-Optimized OS to quickly bring up a container\non a Compute Engine instance with minimal setup. For more information, see\n[Creating and Configuring Instances](/container-optimized-os/docs/how-to/create-configure-instance).\n\nYou can run tools like `ping`, the Google Cloud CLI, `pstree`, `htop`,\n`emacs` and more using the [CoreOS toolbox](/container-optimized-os/docs/how-to/toolbox) utility, which is pre-installed in\nContainer-Optimized OS at `/usr/bin/toolbox`. See [Debugging with toolbox](/container-optimized-os/docs/how-to/toolbox) for\nmore information.\n\nUse cases for Container-Optimized OS\n------------------------------------\n\nContainer-Optimized OS can be used to run most containers. You should\nconsider using Container-Optimized OS as the operating system for your\nCompute Engine instance if you have the following needs:\n\n- You need support for containers or Kubernetes with minimal setup.\n- You need an operating system that has a small footprint and is [security\n hardened](/container-optimized-os/docs/concepts/security) for containers.\n- You need an operating system that is tested and verified for running Kubernetes on your Compute Engine instances.\n\nContainer-Optimized OS may not be the right choice for you in the following\ncases:\n\n- Your application is not containerized or your containerized application depends on kernel modules, drivers and other additional packages that are not available in Container-Optimized OS.\n- You need professional customer support from a Linux provider (Canonical, Core OS, Redhat, SUSE, etc).\n- You want your image and OS application to be fully supported outside Google Cloud.\n\nSee [Containers on Google Cloud](/compute/docs/containers) to learn about\nother operating systems you can use to\nrun containerized applications on Google Cloud. Compute Engine\n[provides images](/compute/docs/images) for other popular operating systems, including images that are\n[optimized for containers](/compute/docs/containers#container_images)."]]