Skip to content

Commit

Permalink
Fix base image for ASP.NET Azure Linux 3.0 extra images (dotnet#6031)
Browse files Browse the repository at this point in the history
  • Loading branch information
lbussell committed Nov 7, 2024
1 parent cdc15de commit 1de5542
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 4 deletions.
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6569,7 +6569,7 @@
"REPO": "$(Repo:runtime)"
},
"dockerfile": "src/aspnet/9.0/azurelinux3.0-distroless-extra/arm64v8",
"dockerfileTemplate": "eng/dockerfile-templates/aspnet/Dockerfile.linux",
"dockerfileTemplate": "eng/dockerfile-templates/aspnet/Dockerfile.linux.extra",
"os": "linux",
"osVersion": "azurelinux3.0-distroless",
"tags": {
Expand Down Expand Up @@ -6707,7 +6707,7 @@
"REPO": "$(Repo:runtime-deps)"
},
"dockerfile": "src/aspnet/9.0/azurelinux3.0-distroless-composite-extra/arm64v8",
"dockerfileTemplate": "eng/dockerfile-templates/aspnet/Dockerfile.linux-composite",
"dockerfileTemplate": "eng/dockerfile-templates/aspnet/Dockerfile.linux-composite.extra",
"os": "linux",
"osVersion": "azurelinux3.0-distroless",
"tags": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN mkdir /dotnet-symlink \


# ASP.NET Composite Image
FROM $REPO:9.0.0-rc.2-azurelinux3.0-distroless-arm64v8
FROM $REPO:9.0.0-rc.2-azurelinux3.0-distroless-extra-arm64v8

ENV \
# .NET Runtime version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN aspnetcore_version=9.0.0-rc.2.24474.3 \


# ASP.NET Core image
FROM $REPO:9.0.0-rc.2-azurelinux3.0-distroless-arm64v8
FROM $REPO:9.0.0-rc.2-azurelinux3.0-distroless-extra-arm64v8

# ASP.NET Core version
ENV ASPNET_VERSION=9.0.0-rc.2.24474.3
Expand Down
5 changes: 5 additions & 0 deletions tests/Microsoft.DotNet.Docker.Tests/AspnetImageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ public async Task VerifyFxDependentAppScenario(ProductImageData imageData)
await scenario.ExecuteAsync();
}

[DotNetTheory]
[MemberData(nameof(GetImageData))]
public async Task VerifyGlobalizationScenario(ProductImageData imageData) =>
await VerifyGlobalizationScenarioBase(imageData);

[DotNetTheory]
[MemberData(nameof(GetImageData))]
public void VerifyEnvironmentVariables(ProductImageData imageData)
Expand Down
17 changes: 17 additions & 0 deletions tests/Microsoft.DotNet.Docker.Tests/CommonRuntimeImageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
using Microsoft.DotNet.Docker.Tests.TestScenarios;

namespace Microsoft.DotNet.Docker.Tests
{
Expand Down Expand Up @@ -79,5 +81,20 @@ protected void VerifyCommonShellNotInstalledForDistroless(ProductImageData image

Assert.Contains("Exit code: 127", ex.Message);
}

protected async Task VerifyGlobalizationScenarioBase(ProductImageData imageData)
{
// Inclusion of tzdata and icu together was not consistent in .NET 6, so skip the test.
// Remove once .NET 6 is EOL.
if (imageData.Version.Major == 6)
{
return;
}

using (GlobalizationScenario testScenario = new(imageData, ImageRepo, DockerHelper))
{
await testScenario.ExecuteAsync();
}
}
}
}
5 changes: 5 additions & 0 deletions tests/Microsoft.DotNet.Docker.Tests/RuntimeImageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ public async Task VerifyTestProjectScenario(ProductImageData imageData)
await testScenario.ExecuteAsync();
}

[DotNetTheory]
[MemberData(nameof(GetImageData))]
public async Task VerifyGlobalizationScenario(ProductImageData imageData) =>
await VerifyGlobalizationScenarioBase(imageData);

[DotNetTheory]
[MemberData(nameof(GetImageData))]
public void VerifyEnvironmentVariables(ProductImageData imageData)
Expand Down

0 comments on commit 1de5542

Please sign in to comment.