Skip to content

Commit 6ad6ad7

Browse files
committed
Update templates from nightly
1 parent 08e7f8d commit 6ad6ad7

File tree

6 files changed

+39
-16
lines changed

6 files changed

+39
-16
lines changed

eng/dockerfile-templates/aspnet/Dockerfile.linux

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@
2121
set osVersionBase to when(isDistroless, match(OS_VERSION, ".+(?=.*-)")[0], OS_VERSION_BASE) ^
2222

2323
_ Workaround for https://bugs.launchpad.net/ubuntu/+source/tar/+bug/2059734. Remove when fixed. ^
24-
set osVersionBase to when(osVersionBase = "noble" && ARCH_VERSIONED = "arm32v7", "jammy", osVersionBase) ^
24+
_ Workaround for https://bugs.launchpad.net/ubuntu/+source/tar/+bug/2059734. Remove when fixed. ^
25+
set osVersionBase to
26+
when(ARCH_VERSIONED = "arm32v7",
27+
when(osVersionBase = "noble", "jammy",
28+
when(osVersionBase = "trixie", "bookworm", osVersionBase)),
29+
osVersionBase) ^
2530

2631
set installerImageTag to when(isDistrolessAzureLinux,
2732
cat("mcr.microsoft.com/"

eng/dockerfile-templates/runtime-deps/Dockerfile.chiseled-ubuntu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
] ^
2929

3030
set basePkgs to when (dotnetVersion = "8.0", cat(basePkgs, ["zlib1g_libs"]), basePkgs) ^
31+
set basePkgs to when (dotnetVersion != "8.0" && dotnetVersion != "9.0", cat(basePkgs, ["base-files_chisel"]), basePkgs) ^
3132

3233
_ Arrays in cottle are actually key-value maps. Sorting the array sorts by value
3334
but does not change the key value. In order to have the right index in the

eng/dockerfile-templates/runtime/Dockerfile.linux

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@
1919
set osVersionBase to when(isDistroless, match(OS_VERSION, ".+(?=.*-)")[0], OS_VERSION_BASE) ^
2020

2121
_ Workaround for https://bugs.launchpad.net/ubuntu/+source/tar/+bug/2059734. Remove when fixed. ^
22-
set osVersionBase to when(osVersionBase = "noble" && ARCH_VERSIONED = "arm32v7", "jammy", osVersionBase) ^
22+
set osVersionBase to
23+
when(ARCH_VERSIONED = "arm32v7",
24+
when(osVersionBase = "noble", "jammy",
25+
when(osVersionBase = "trixie", "bookworm", osVersionBase)),
26+
osVersionBase) ^
2327

2428
set installerImageTag to when(isDistrolessAzureLinux,
2529
cat("mcr.microsoft.com/"

eng/dockerfile-templates/sdk/Dockerfile.envs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{{
22
_ ARGS:
3-
is-internal (optional): Whether the Dockerfile is targeting an internal build of the product ^
3+
is-internal (optional): Whether the Dockerfile is targeting an internal build of the product
4+
include-powershell-vars (optional): Whether PowerShell will be installed in the image ^
45

56
set dotnetVersion to join(slice(split(PRODUCT_VERSION, "."), 0, 2), ".") ^
67
set isStableBranding to (find(VARIABLES[cat("sdk|", dotnetVersion, "|build-version")], "-servicing") >= 0 ||
@@ -10,7 +11,9 @@
1011
VARIABLES[cat("sdk|", dotnetVersion, "|build-version")]) ^
1112
set isAlpine to find(OS_VERSION, "alpine") >= 0 ^
1213
set isWindows to find(OS_VERSION, "nanoserver") >= 0 || find(OS_VERSION, "windowsservercore") >= 0 ^
13-
set lineContinuation to when(isWindows, "`", "\")
14+
set lineContinuation to when(isWindows, "`", "\") ^
15+
16+
set includePowerShellRollForward to dotnetVersion != "8.0" && dotnetVersion != "9.0"
1417
}}ENV {{lineContinuation}}
1518
# Do not generate certificate
1619
DOTNET_GENERATE_ASPNET_CERTIFICATE=false {{lineContinuation}}
@@ -23,6 +26,8 @@
2326
# Enable correct mode for dotnet watch (only mode supported in a container)
2427
DOTNET_USE_POLLING_FILE_WATCHER=true {{lineContinuation}}
2528
# Skip extraction of XML docs - generally not useful within an image/container - helps performance
26-
NUGET_XMLDOC_MODE=skip {{lineContinuation}}
29+
NUGET_XMLDOC_MODE=skip {{if ARGS["include-powershell-vars"]:{{lineContinuation}}
2730
# PowerShell telemetry for docker image usage
28-
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-DotnetSDK-{{OS_ARCH_HYPHENATED}}
31+
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-DotnetSDK-{{OS_ARCH_HYPHENATED}}{{if includePowerShellRollForward: {{lineContinuation}}
32+
# Workaround for https://github.com/PowerShell/PowerShell/issues/20685
33+
DOTNET_ROLL_FORWARD=Major}}}}

eng/dockerfile-templates/sdk/Dockerfile.linux

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,21 @@
99
set baseImageTag to cat("$REPO:", tagVersion, "-", OS_VERSION, ARCH_TAG_SUFFIX) ^
1010

1111
_ Workaround for https://bugs.launchpad.net/ubuntu/+source/tar/+bug/2059734. Remove when fixed. ^
12-
set useNobleArm32Workaround to OS_VERSION_BASE = "noble" && ARCH_SHORT = "arm" ^
13-
set osVersionBase to when(useNobleArm32Workaround, "jammy", OS_VERSION_BASE) ^
12+
set useJammyArm32Workaround to (OS_VERSION_BASE = "noble" || OS_VERSION_BASE = "trixie") && ARCH_SHORT = "arm" ^
13+
set osVersionBase to
14+
when(useJammyArm32Workaround,
15+
when(OS_VERSION_BASE = "noble",
16+
"jammy",
17+
"bookworm"),
18+
OS_VERSION_BASE) ^
1419

1520
set internalInstallerBase to when(isAlpine || isAzureLinux,
1621
baseImageTag,
1722
cat(ARCH_VERSIONED, "/buildpack-deps:", osVersionBase, "-curl")) ^
1823

24+
set isPowerShellSupported to !(isAlpine && ARCH_SHORT != "x64") ^
25+
set includePowerShellVars to isPowerShellSupported || dotnetVersion = "8.0" || dotnetVersion = "9.0" ^
26+
1927
set pkgs to filter(
2028
when(isAlpine,
2129
when(dotnetVersion = "8.0",
@@ -54,7 +62,7 @@
5462
]
5563
)), len)
5664
}}ARG REPO=mcr.microsoft.com/dotnet/aspnet
57-
{{if isInternal || useNobleArm32Workaround:# Installer image
65+
{{if isInternal || useJammyArm32Workaround:# Installer image
5866
FROM {{internalInstallerBase}} AS installer{{if isInternal:
5967

6068
ARG ACCESSTOKEN}}
@@ -68,27 +76,27 @@ RUN {{InsertTemplate("../Dockerfile.linux.install-pkgs",
6876
[
6977
"install-method": "download-and-install",
7078
"is-internal": isInternal,
71-
"disable-first-run-experience": useNobleArm32Workaround,
72-
"no-version-env-var": useNobleArm32Workaround
79+
"disable-first-run-experience": useJammyArm32Workaround,
80+
"no-version-env-var": useJammyArm32Workaround
7381
])}}
7482

7583

7684
# .NET SDK image
7785
}}FROM {{baseImageTag}}
7886

79-
{{InsertTemplate("Dockerfile.envs", ["is-internal": isInternal])}}
87+
{{InsertTemplate("Dockerfile.envs", ["is-internal": isInternal, "include-powershell-vars": includePowerShellVars])}}
8088

8189
RUN {{InsertTemplate("../Dockerfile.linux.install-pkgs",
8290
[
8391
"pkgs": pkgs
8492
])}}
8593

86-
{{if isInternal || useNobleArm32Workaround:COPY --from=installer ["/usr/share/dotnet", "/usr/share/dotnet"]
94+
{{if isInternal || useJammyArm32Workaround:COPY --from=installer ["/usr/share/dotnet", "/usr/share/dotnet"]
8795

8896
{{InsertTemplate("Dockerfile.linux.first-run")}}^else:{{
8997
InsertTemplate("Dockerfile.linux.install-sdk",
9098
[
9199
"install-method": "download-and-install",
92-
])}}}}{{if !(isAlpine && ARCH_SHORT != "x64"):
100+
])}}}}{{if isPowerShellSupported:
93101

94102
{{InsertTemplate("Dockerfile.linux.install-powershell")}}}}

eng/dockerfile-templates/sdk/Dockerfile.windows

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ARG REPO=mcr.microsoft.com/dotnet/aspnet
2424

2525
}}FROM {{aspnetBaseTag}}
2626

27-
{{InsertTemplate("Dockerfile.envs", ["is-internal": isInternal])}}
27+
{{InsertTemplate("Dockerfile.envs", ["is-internal": isInternal, "include-powershell-vars": "true"])}}
2828

2929
{{InsertTemplate("Dockerfile.windows.install-components")}}
3030

@@ -49,7 +49,7 @@ ARG ACCESSTOKEN
4949
# SDK image
5050
FROM {{aspnetBaseTag}}
5151

52-
{{InsertTemplate("Dockerfile.envs", ["is-internal": isInternal])}}
52+
{{InsertTemplate("Dockerfile.envs", ["is-internal": isInternal, "include-powershell-vars": "true"])}}
5353

5454
{{InsertTemplate("../Dockerfile.windows.set-path", [ "path": paths ])}}
5555

0 commit comments

Comments
 (0)