Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
21 changes: 21 additions & 0 deletions eng/docker-tools/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@ All breaking changes and new features in `eng/docker-tools` will be documented i

---

## 2026-04-02: Extra Docker build options can be passed through ImageBuilder

- Pull request: [#2063](https://github.com/dotnet/docker-tools/pull/2063)

ImageBuilder's `build` command now accepts repeated `--build-option` arguments and forwards them directly to
`docker build`. This allows repos to pass options such as `--ulimit nofile=65536:65536` or `--network host`
through `imageBuilderBuildArgs`, in addition to standard Dockerfile `--build-arg` values.

**How to use:**

```yaml
customBuildInitSteps:
- powershell: |
$args = '--build-option "--ulimit nofile=65536:65536"'
echo "##vso[task.setvariable variable=imageBuilderBuildArgs]$args"
```

Repeat `--build-option` for multiple Docker arguments, and quote values that contain spaces.

---

## 2026-03-25: Manifest list creation moved to Post_Build

- Issue: [#2002](https://github.com/dotnet/docker-tools/issues/2002)
Expand Down
11 changes: 10 additions & 1 deletion eng/docker-tools/DEV-GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ To force a rebuild regardless of cache state, set the `noCache` parameter to `tr

### Pattern: Adding Build Arguments

Pass additional arguments to Docker builds via ImageBuilder:
Pass Dockerfile `ARG` values via ImageBuilder:

```yaml
customBuildInitSteps:
Expand All @@ -379,6 +379,15 @@ customBuildInitSteps:
echo "##vso[task.setvariable variable=imageBuilderBuildArgs]$args"
```

To pass raw options directly to `docker build`, use `--build-option`. Quote values that contain spaces:

```yaml
customBuildInitSteps:
- powershell: |
$args = '--build-option "--ulimit nofile=65536:65536"'
echo "##vso[task.setvariable variable=imageBuilderBuildArgs]$args"
```

### Pattern: Re-running Stages with `stages` and `sourceBuildPipelineRunId`

A powerful pattern is combining the `stages` variable with the `sourceBuildPipelineRunId` pipeline parameter to run specific stages using artifacts from a previous build. This is useful for:
Expand Down
Loading