Access source code

Stay organized with collections Save and categorize content based on your preferences.

This page provides details on Container-Optimized OS source code, including how to access Container-Optimized OS image source, source for related container tools, and how to build from source.

Container-Optimized OS image source

Container-Optimized OS from Google is a fork of the Chromium OS open-source project. You can find the majority of the source code for Container-Optimized OS in the COS repositories https://cos.googlesource.com.

Some of the useful resources that can help you determine the source code used to build the image include:

        $ gsutil ls gs://cos-tools/11021.11.0/
        gs://cos-tools/11021.11.0/kernel-headers.tgz
        gs://cos-tools/11021.11.0/kernel-src.tar.gz
        gs://cos-tools/11021.11.0/kernel-src.tar.gz.md5
  • Those familiar with Chromium OS build system may also find the build recipes under https://cos.googlesource.com/cos/overlays/board-overlays/+/master/project-lakitu/ useful.

  • Actual source code archives for individual packages can also be found under one of the package mirrors maintained by Chromium OS build system. You can access them by appending the correct tarball name to one of the following URLs:

    • https://storage.googleapis.com/chromeos-mirror/gentoo/distfiles/
    • https://storage.googleapis.com/chromeos-localmirror/distfiles/

      For example, to download kubernetes version 1.19.2, use https://storage.googleapis.com/chromeos-localmirror/distfiles/kubernetes-server-linux-amd64-1.19.2.tar.gz.

The Chromium OS Build FAQ and other Chromium OS Build documentation explains how the build system and package mirrors work.

Container source

Container-Optimized OS from Google ships with some tools that download containers at runtime. Those containers are also open sourced. The following table lists the containers, their source location and release location.

Containers Release Location
Toolbox Container Registry gcr.io/cos-cloud/toolbox
Cos-gpu-installer Container Registry gcr.io/cos-cloud/cos-gpu-installer
Cloud logging agent Container Registry gcr.io/stackdriver-agents/stackdriver-logging-agent
Konlet agent Container Registry gcr.io/gce-containers/konlet

Building from source

Follow the instructions on Building from Open Source to build a Container-Optimized OS disk image from the source.

Source code contributions

Container-Optimized OS does not accept direct contributions from the public.