diff --git a/content/docs/buildpack-author-guide/create-buildpack/adding-bill-of-materials.md b/content/docs/buildpack-author-guide/create-buildpack/adding-bill-of-materials.md index 55f678110..6e9b11b61 100644 --- a/content/docs/buildpack-author-guide/create-buildpack/adding-bill-of-materials.md +++ b/content/docs/buildpack-author-guide/create-buildpack/adding-bill-of-materials.md @@ -15,14 +15,11 @@ One of the benefits of buildpacks is they can also populate the app image with m You can find some of this information using `pack` via its `inspect-image` command. The bill-of-materials information will be available using `pack sbom download`. - ```bash pack inspect-image test-node-js-app ``` - You should see the following: - ```text Run Images: cnbs/sample-base-run:jammy diff --git a/content/docs/buildpack-author-guide/create-buildpack/caching.md b/content/docs/buildpack-author-guide/create-buildpack/caching.md index 29e18cedd..57e15a6cf 100644 --- a/content/docs/buildpack-author-guide/create-buildpack/caching.md +++ b/content/docs/buildpack-author-guide/create-buildpack/caching.md @@ -128,11 +128,12 @@ default = true EOL ``` -Now when you build your app: +Now when you build your app, the second call will reuse the layer: ```text pack build test-node-js-app --path ./node-js-sample-app --buildpack ./node-js-buildpack +pack build test-node-js-app --path ./node-js-sample-app --buildpack ./node-js-buildpack ``` @@ -143,7 +144,7 @@ you will see the new caching logic at work during the `BUILDING` phase: ===> BUILDING ... ---> NodeJS Buildpack ----> Reusing NodeJS +-----> Reusing NodeJS ``` Next, let's see how buildpack users may be able to provide configuration to the buildpack. diff --git a/content/docs/buildpack-author-guide/create-buildpack/make-buildpack-configurable.md b/content/docs/buildpack-author-guide/create-buildpack/make-buildpack-configurable.md index f1d2e7343..81687352c 100644 --- a/content/docs/buildpack-author-guide/create-buildpack/make-buildpack-configurable.md +++ b/content/docs/buildpack-author-guide/create-buildpack/make-buildpack-configurable.md @@ -62,7 +62,7 @@ node_js_version=$(cat "$plan" | yj -t | jq -r '.entries[] | select(.name == "nod node_js_url=https://nodejs.org/dist/v${node_js_version}/node-v${node_js_version}-linux-x64.tar.xz remote_nodejs_version=$(cat "${layersdir}/node-js.toml" 2> /dev/null | yj -t | jq -r .metadata.nodejs_version 2>/dev/null || echo 'NOT FOUND') if [[ "${node_js_url}" != *"${remote_nodejs_version}"* ]] ; then - echo "-----> Downloading and extracting NodeJS" + echo "-----> Downloading and extracting NodeJS" ${node_js_version} wget -q -O - "${node_js_url}" | tar -xJf - --strip-components 1 -C "${node_js_layer}" else echo "-----> Reusing NodeJS" @@ -94,11 +94,11 @@ Finally, create a file `node-js-sample-app/.node-js-version` with the following 18.18.1 ``` -Now when you run: +In the following `pack` invocation we choose to `--clear-cache` so that we explicitly do not re-use cached layers. This helps us demonstrate that the NodeJS runtime layer does not get restored from a cache. ```bash -pack build test-node-js-app --path ./node-js-sample-app --buildpack ./node-js-buildpack +pack build test-node-js-app --clear-cache --path ./node-js-sample-app --buildpack ./node-js-buildpack ``` @@ -109,7 +109,7 @@ You will notice that version of NodeJS specified in the app's `.node-js-version` ===> BUILDING ... ---> NodeJS Buildpack ----> Downloading and extracting NodeJS 18.18.1 +-----> Downloading and extracting NodeJS 18.18.1 ``` Next, let's see how buildpacks can store information about the dependencies provided in the output app image for introspection.