gvisor/tools/images
Adin Scannell aa75a3da51 Fix build.sh and VM targets.
PiperOrigin-RevId: 306289643
2020-04-13 12:48:38 -07:00
..
ubuntu1604 Automated rollback of changelist 305940483 2020-04-10 14:29:01 -07:00
ubuntu1804 Add tools for generating images. 2020-01-22 10:39:45 -08:00
BUILD Fix build.sh and VM targets. 2020-04-13 12:48:38 -07:00
README.md Fix build.sh and VM targets. 2020-04-13 12:48:38 -07:00
build.sh Fix build.sh and VM targets. 2020-04-13 12:48:38 -07:00
defs.bzl Fix build.sh and VM targets. 2020-04-13 12:48:38 -07:00
execute.sh
test.cc
zone.sh Fix build.sh and VM targets. 2020-04-13 12:48:38 -07:00

README.md

Images

All commands in this directory require the gcloud project to be set.

For example: gcloud config set project gvisor-kokoro-testing.

Images can be generated by using the vm_image rule. This rule will generate a binary target that builds an image in an idempotent way, and can be referenced from other rules.

For example:

vm_image(
    name = "ubuntu",
    project = "ubuntu-1604-lts",
    family = "ubuntu-os-cloud",
    scripts = [
        "script.sh",
        "other.sh",
    ],
)

These images can be built manually by executing the target. The output on stdout will be the image id (in the current project).

Images are always named per the hash of all the hermetic input scripts. This allows images to be memoized quickly and easily.

The vm_test rule can be used to execute a command remotely. This is still under development however, and will likely change over time.

For example:

vm_test(
    name = "mycommand",
    image = ":ubuntu",
    targets = [":test"],
)