Skip to content
Draft
Show file tree
Hide file tree
Changes from 3 commits
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
45 changes: 45 additions & 0 deletions website/docs/buildkit-drivers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: Buildkit Drivers
---

Dalec builds use Docker Buildkit under the hood. Buildkit supports different drivers that determine where and how builds are executed. Understanding these drivers can help you choose the right setup for your build environment, especially when building at scale or in containerized environments like Kubernetes.

## What are Buildkit Drivers?

Buildkit drivers are different backends that execute the build operations. Each driver has different capabilities and is suitable for different use cases:

- **docker**: The default driver that runs builds in the Docker daemon
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add links to each of these drivers

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added links to all four buildkit drivers (docker, docker-container, kubernetes, remote) pointing to their respective Docker documentation pages. eb7528b

- **docker-container**: Runs builds in an isolated container with more features
- **kubernetes**: Runs builds as pods in a Kubernetes cluster
- **remote**: Connects to a remote buildkit daemon

For a complete list of available drivers, see the [official Docker documentation on buildkit drivers](https://docs.docker.com/build/builders/drivers/).

## Kubernetes Driver

The [Kubernetes driver](https://docs.docker.com/build/builders/drivers/kubernetes/) is particularly useful when you want to run builds inside a Kubernetes cluster. This is beneficial for:

- **Scalability**: Distribute builds across multiple nodes
- **Resource isolation**: Each build runs in its own pod with defined resource limits
- **Security**: Builds run in isolated containers with proper security contexts
- **Integration**: Native integration with Kubernetes RBAC, secrets, and networking

### Setting up the Kubernetes Driver

2. **Create a builder instance**:
```bash
docker buildx create \
--driver kubernetes \
--name k8s-builder \
--bootstrap \
--use
```

3. **Build with Dalec using the Kubernetes driver**:
```bash
docker buildx build \
-t my-package:latest \
-f my-spec.yml \
--target=azl3 \
.
```
Loading
Loading