Skip to content

Commit

Permalink
Merge pull request #18382 from dvdksn/build-resource-config-driveropts
Browse files Browse the repository at this point in the history
build: resource constraint driver opts
  • Loading branch information
dvdksn authored Nov 17, 2023
2 parents f4a4be6 + 4c5730b commit bf958ab
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions content/build/drivers/docker-container.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,22 @@ container
The following table describes the available driver-specific options that you can
pass to `--driver-opt`:

| Parameter | Type | Default | Description |
| --------------- | ------ | ---------------- | ------------------------------------------------------------------------------------------ |
| `image` | String | | Sets the image to use for running BuildKit. |
| `network` | String | | Sets the network mode for running the BuildKit container. |
| `cgroup-parent` | String | `/docker/buildx` | Sets the cgroup parent of the BuildKit container if Docker is using the `cgroupfs` driver. |
| `env.<key>` | String | | Sets the environment variable `key` to the specified `value` in the BuildKit container. |
| Parameter | Type | Default | Description |
| --------------- | ------ | ---------------- | --------------------------------------------------------------------------------- |
| `image` | String | | Sets the BuildKit image to use for the container. |
| `memory` | String | | Sets the amount of memory the container can use. |
| `memory-swap` | String | | Sets the memory swap limit for the container. |
| `cpu-quota` | String | | Imposes a CPU CFS quota on the container. |
| `cpu-period` | String | | Sets the CPU CFS scheduler period for the container. |
| `cpu-shares` | String | | Configures CPU shares (relative weight) of the container. |
| `cpuset-cpus` | String | | Limits the set of CPU cores the container can use. |
| `cpuset-mems` | String | | Limits the set of CPU memory nodes the container can use. |
| `network` | String | | Sets the network mode for the container. |
| `cgroup-parent` | String | `/docker/buildx` | Sets the cgroup parent of the container if Docker is using the "cgroupfs" driver. |
| `env.<key>` | String | | Sets the environment variable `key` to the specified `value` in the container. |

Before you configure the resource limits for the container,
read about [configuring runtime resource constraints for containers](../../config/containers/resource_constraints/).

## Usage

Expand Down

0 comments on commit bf958ab

Please sign in to comment.