Skip to content

Commit

Permalink
Added section about useBuildCache
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard87 committed Nov 3, 2023
1 parent 2aa130f commit f6d9183
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ spec:
spec:
build:
useBuildKit: true
useBuildCache: true
secrets:
- SECRET_1
- SECRET_2
Expand All @@ -63,6 +64,13 @@ Otherwise, there will be an error during the docker image build:
Example: instead of `FROM alpine` use `FROM docker.io/alpine`, as this `alpine` image is located in the [Docker Hub](https://hub.docker.com/) repository.
:::

### `useBuildCache`
`useBuildCache` - (optional, defaults to `true`) pushes all layers to cache, and uses it in future builds when possible. Requires `useBuildKit` to be enabled. Internally we set `--cache-to`, `--cache-from` and `--layers` in Buildah. Read more at [Buildahs Documentation](https://github.com/containers/buildah/blob/main/docs/buildah-build.1.md)

:::tip SECURITY
Currently all build jobs have access to all cached layers. Make sure you never store secrets or confidential information in any intermitent layer, multistage image, or in your final container image.
:::

### `secrets`
`secrets` - (optional) add secrets to Radix config `radixconfig.yaml` in the branch defined as `Config Branch` for your application. This will trigger a new build. This build will fail as no specified build secret has been set. You will now be able to set the secret **values** in the configuration section of your app in the Radix Web Console. These secrets also can be used in the [sub-pipelines](../../guides/sub-pipeline).

Expand Down

0 comments on commit f6d9183

Please sign in to comment.