diff --git a/image_extension.md b/image_extension.md index f4e939a..bb1edae 100644 --- a/image_extension.md +++ b/image_extension.md @@ -89,9 +89,27 @@ Correspondingly, each `/bin/generate` executable: - MAY log output from the build process to `stdout`. - MAY emit error, warning, or debug messages to `stderr`. - MAY write either or both of `build.Dockerfile` and `run.Dockerfile` to the `` directory. This file MUST adhere to the requirements listed below. +- MAY create the following folders in the `` directory with an arbitrary content: + + either: + + - `context` + + or the image-specific folders: + + - `context.run` + - `context.build` - MAY write key-value pairs to `/extend-config.toml` that are provided as build args to build.Dockerfile when extending the build image. - MUST NOT write SBOM (Software-Bill-of-Materials) files as described in the [Software-Bill-of-Materials](#software-bill-of-materials) section. +#### Context Folders + +- The `/context` folder MUST NOT be created together with any combination of the image-specific folders. +- If the folder `/context` is present it will be set as the build context during the `extend` phase of the build and run images. +- If the folder `/context.run` is present it will be set as the build context during the `extend` phase of the run image only. +- If the folder `/context.build` is present it will be set as the build context during the `extend` phase of the build image only. +- If none of these folders is not present, the build context defaults to the `` folder. + #### Dockerfile Requirements A `run.Dockerfile`