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` diff --git a/platform.md b/platform.md index dd50486..52763e1 100644 --- a/platform.md +++ b/platform.md @@ -605,14 +605,15 @@ When extending the build image: | `1-10`, `13-19` | Generic lifecycle errors | | `100-109` | Extension-specific lifecycle errors | -- For each extension in `` in order, if a Dockerfile exists in `//`, the lifecycle: +- For each extension in `` in order, if a Dockerfile exists in `//.Dockerfile`, the lifecycle: - SHALL apply the Dockerfile to the environment according to the process outlined in the [Image Extension Specification](image-extension.md). + - SHALL set the build context to the folder according to the process outlined in the [Image Extension Specification](image-extension.md). - The extended image MUST be an extension of: - The `build-image` in `` when `` is `build`, or - The `run-image` in `` when `` is `run` -- When extending the build image, after all `build.Dockefile`s are applied, the lifecycle: +- When extending the build image, after all `build.Dockerfile`s are applied, the lifecycle: - SHALL proceed with the `build` phase using the provided `` and `` -- When extending the run image, after all `run.Dockefile`s are applied, the lifecycle: +- When extending the run image, after all `run.Dockerfile`s are applied, the lifecycle: - **If** any `run.Dockerfile` set the label `io.buildpacks.rebasable` to `false` or left the label unset: - SHALL set the label `io.buildpacks.rebasable` to `false` on the extended run image - **If** after the final `run.Dockerfile` the run image user is `root`,