xref: /aosp_15_r20/external/crosvm/tools/impl/cros_container/README.md (revision bb4ee6a4ae7042d18b07a98463b9c8b875e44b39)
1*bb4ee6a4SAndroid Build Coastguard Worker# Experimental Setup on Minimal Container to Build crosvm in chromeOS Tree
2*bb4ee6a4SAndroid Build Coastguard Worker
3*bb4ee6a4SAndroid Build Coastguard WorkerThis folder contains a setup to build a container that includes initialized cros_sdk and precompiled
4*bb4ee6a4SAndroid Build Coastguard Workerdependencies of crosvm to speed up process of develop and test crosvm in the chromeOS tree.
5*bb4ee6a4SAndroid Build Coastguard WorkerCurrently, we aim to produce a fresh cros_container every week (about 20GB in size).
6*bb4ee6a4SAndroid Build Coastguard Worker
7*bb4ee6a4SAndroid Build Coastguard Worker## Usage Instruction
8*bb4ee6a4SAndroid Build Coastguard Worker
9*bb4ee6a4SAndroid Build Coastguard WorkerThis container need to be built with `docker buildx` for its support of insecure builder (equivalent
10*bb4ee6a4SAndroid Build Coastguard Workerto `docker run --privileged` but for build) which is required for `cros_sdk` due to its usage of
11*bb4ee6a4SAndroid Build Coastguard Workermultiple linux namespaces and chroot.
12*bb4ee6a4SAndroid Build Coastguard Worker
13*bb4ee6a4SAndroid Build Coastguard WorkerIndividual commands from the `cloudbuild.yaml` files can be executed locally. Note you need
14*bb4ee6a4SAndroid Build Coastguard Workerpermission to access crosvm's Google Cloud project to push the container into artifact registry. For
15*bb4ee6a4SAndroid Build Coastguard Workerpeople without access but plan to push the finished container to a container registry, please
16*bb4ee6a4SAndroid Build Coastguard Workersubstitute `gcr.io/crosvm-infra/crosvm_cros_cloudbuild` with your own container name.
17*bb4ee6a4SAndroid Build Coastguard Worker
18*bb4ee6a4SAndroid Build Coastguard WorkerTo use it in Cloud Build, run `gcloud builds submit --config=cloudbuild.yaml` in your command line
19*bb4ee6a4SAndroid Build Coastguard Workerwith this folder as working directory.
20