Skip to content

Commit daaba8d

Browse files
[nightly] Update dependencies from dotnet/dotnet
1 parent 9b6a0de commit daaba8d

33 files changed

Lines changed: 33 additions & 78 deletions

eng/docker-tools/CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,27 @@ All breaking changes and new features in `eng/docker-tools` will be documented i
44

55
---
66

7+
## 2026-04-02: Extra Docker build options can be passed through ImageBuilder
8+
9+
- Pull request: [#2063](https://github.com/dotnet/docker-tools/pull/2063)
10+
11+
ImageBuilder's `build` command now accepts repeated `--build-option` arguments and forwards them directly to
12+
`docker build`. This allows repos to pass options such as `--ulimit nofile=65536:65536` or `--network host`
13+
through `imageBuilderBuildArgs`, in addition to standard Dockerfile `--build-arg` values.
14+
15+
**How to use:**
16+
17+
```yaml
18+
customBuildInitSteps:
19+
- powershell: |
20+
$args = '--build-option "--ulimit nofile=65536:65536"'
21+
echo "##vso[task.setvariable variable=imageBuilderBuildArgs]$args"
22+
```
23+
24+
Repeat `--build-option` for multiple Docker arguments, and quote values that contain spaces.
25+
26+
---
27+
728
## 2026-03-25: Manifest list creation moved to Post_Build
829

930
- Issue: [#2002](https://github.com/dotnet/docker-tools/issues/2002)

eng/docker-tools/DEV-GUIDE.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ To force a rebuild regardless of cache state, set the `noCache` parameter to `tr
370370

371371
### Pattern: Adding Build Arguments
372372

373-
Pass additional arguments to Docker builds via ImageBuilder:
373+
Pass Dockerfile `ARG` values via ImageBuilder:
374374

375375
```yaml
376376
customBuildInitSteps:
@@ -379,6 +379,15 @@ customBuildInitSteps:
379379
echo "##vso[task.setvariable variable=imageBuilderBuildArgs]$args"
380380
```
381381

382+
To pass raw options directly to `docker build`, use `--build-option`. Quote values that contain spaces:
383+
384+
```yaml
385+
customBuildInitSteps:
386+
- powershell: |
387+
$args = '--build-option "--ulimit nofile=65536:65536"'
388+
echo "##vso[task.setvariable variable=imageBuilderBuildArgs]$args"
389+
```
390+
382391
### Pattern: Re-running Stages with `stages` and `sourceBuildPipelineRunId`
383392

384393
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:

eng/docker-tools/templates/variables/docker-images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
variables:
2-
imageNames.imageBuilderName: mcr.microsoft.com/dotnet-buildtools/image-builder:2941471
2+
imageNames.imageBuilderName: mcr.microsoft.com/dotnet-buildtools/image-builder:2948340
33
imageNames.imageBuilder: $(imageNames.imageBuilderName)
44
imageNames.imageBuilder.withrepo: imagebuilder-withrepo:$(Build.BuildId)-$(System.JobId)
55
imageNames.testRunner: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux3.0-docker-testrunner

eng/dockerfile-templates/sdk/Dockerfile.linux.aot

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
"llvm"
2727
]))))
2828

29-
}}# syntax=docker/dockerfile:1
30-
ARG REPO=mcr.microsoft.com/dotnet/sdk
29+
}}ARG REPO=mcr.microsoft.com/dotnet/sdk
3130
FROM {{baseImageTag}}
3231

3332
RUN {{InsertTemplate("../Dockerfile.linux.install-pkgs", [ "pkgs": pkgs ])}}

eng/dockerfile-templates/sdk/Dockerfile.linux.aot-cross

Lines changed: 0 additions & 46 deletions
This file was deleted.

src/sdk/10.0/alpine3.23-aot/amd64/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# syntax=docker/dockerfile:1
21
ARG REPO=mcr.microsoft.com/dotnet/sdk
32
FROM $REPO:10.0.201-alpine3.23-amd64
43

src/sdk/10.0/alpine3.23-aot/arm64v8/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# syntax=docker/dockerfile:1
21
ARG REPO=mcr.microsoft.com/dotnet/sdk
32
FROM $REPO:10.0.201-alpine3.23-arm64v8
43

src/sdk/10.0/azurelinux3.0-aot/amd64/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# syntax=docker/dockerfile:1
21
ARG REPO=mcr.microsoft.com/dotnet/sdk
32
FROM $REPO:10.0.201-azurelinux3.0-amd64
43

src/sdk/10.0/azurelinux3.0-aot/arm64v8/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# syntax=docker/dockerfile:1
21
ARG REPO=mcr.microsoft.com/dotnet/sdk
32
FROM $REPO:10.0.201-azurelinux3.0-arm64v8
43

src/sdk/10.0/noble-aot/amd64/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# syntax=docker/dockerfile:1
21
ARG REPO=mcr.microsoft.com/dotnet/sdk
32
FROM $REPO:10.0.201-noble-amd64
43

0 commit comments

Comments
 (0)