From 43c7cd9950bdf720f390445c1b6d4d336d2b63d6 Mon Sep 17 00:00:00 2001 From: Ralf Pannemans Date: Tue, 9 Jan 2024 12:47:39 +0100 Subject: [PATCH] Changes for image extension build contexts Signed-off-by: Ralf Pannemans Co-authored-by: Philipp Stehle Co-authored-by: Pavel Busko Co-authored-by: Ralf Pannemans --- image_extension.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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`