Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update useBuildKit docs #412

Merged
merged 2 commits into from
Oct 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions public-site/docs/radix-config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,21 @@ spec:
CONNECTION_STRING: "Provider=MySQLProv;Data Source=mydb;"
```

The `build` section of the spec contains configuration needed during build (CI part) of the components. In this section you can specify build secrets, which is needed when pulling from locked registries, or cloning from locked repositories.
The `build` section of the spec contains configuration used during the build process of the components and jobs.

### `useBuildKit`
`useBuildKit` - (optional, default `false`) build a component with Docker BuildKit. Read [more](/guides/build-secrets/#build-secrets-with-buildkit) in the guide.
`useBuildKit` - (optional, default `false`) builds components and jobs using [Buildah](https://www.redhat.com/en/topics/containers/what-is-buildah). This option provides several benefits over the default Radix build engine:
- Secure handling of [**build secrets**](/guides/build-secrets/#build-secrets-with-buildkit).
- Caching support that can reduce build time, see [`useBuildCache`](#usebuildcache).
- Use images from protected container registries defined in [`privateImageHubs`](#privateimagehubs), in the Dockerfile's `FROM` instructions.

:::tip
When the option `useBuildKit` is set to `true`, Radix will use [buildah](https://www.redhat.com/en/topics/containers/what-is-buildah) to build the components. Buildah requires the `Dockerfile` instruction `FROM` to have a repository prefixing the docker image name.
Otherwise, there will be an error during the docker image build:
Buildah requires the image name in a Dockerfile's `FROM` instructions to be fully qualified, e.g. `FROM docker.io/library/golang:1.22` instead of `FROM golang:1.22`.
The build step will fail with the following error an image name is not fully qualified:

```
Error: creating build container: short-name resolution enforced but cannot prompt without a TTY

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`
Expand Down