From bec679df061a70cccca862f539bcb8d00c2bc5d6 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Tue, 6 Aug 2024 11:42:40 -0400 Subject: [PATCH] doc: add images.json to build image (#94) Refs: https://github.com/paketo-community/ubi-base-stack/issues/88 The plan is to use it in the extensions to find the run images instead of data in the extension.toml file Signed-off-by: Michael Dawson --- .gitignore | 1 + scripts/create.sh | 3 +++ stack/build.Dockerfile | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/.gitignore b/.gitignore index 7e5de77..1a149f4 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ build-java-8/ build-java-11/ build-java-17/ build-java-21/ +stack/images.json diff --git a/scripts/create.sh b/scripts/create.sh index 7ffe6bf..7573ebf 100755 --- a/scripts/create.sh +++ b/scripts/create.sh @@ -64,6 +64,9 @@ function main() { tools::install + # we need to copy images.json for inclusion in the build image + cp images.json stack + # if stack or build argument is provided but not both, then throw an error if [[ -n "${stack_dir_name}" && ! -n "${build_dir_name}" ]] || [[ ! -n "${stack_dir_name}" && -n "${build_dir_name}" ]]; then util::print::error "Both stack-dir and build-dir must be provided" diff --git a/stack/build.Dockerfile b/stack/build.Dockerfile index 12c2969..6dab997 100644 --- a/stack/build.Dockerfile +++ b/stack/build.Dockerfile @@ -1 +1,5 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal:latest +USER root +RUN mkdir -p /etc/buildpacks +COPY ./images.json /etc/buildpacks/images.json +RUN chmod 744 /etc/buildpacks/images.json