diff --git a/eng/dockerfile-templates/aspire-dashboard/Dockerfile.linux b/eng/dockerfile-templates/aspire-dashboard/Dockerfile.linux index 59ce18c2ed..9364478c9d 100644 --- a/eng/dockerfile-templates/aspire-dashboard/Dockerfile.linux +++ b/eng/dockerfile-templates/aspire-dashboard/Dockerfile.linux @@ -3,8 +3,8 @@ set aspireMajorMinor to cat(aspireVersionParts[0], ".", aspireVersionParts[1]) ^ set isAzureLinux to find(OS_VERSION, "azurelinux") >= 0 ^ - set aspnetBaseTag to - cat("$REPO:", VARIABLES[cat("dotnet|8.0|product-version")], "-", OS_VERSION, "-extra", ARCH_TAG_SUFFIX) ^ + set runtimeDepsBaseTag to + cat("$REPO:", VARIABLES[cat("dotnet|11.0|product-version")], "-", OS_VERSION, "-extra", ARCH_TAG_SUFFIX) ^ set osVersionBase to match(OS_VERSION, ".+(?=.*-)")[0] ^ set installerImageTag to when(isAzureLinux, cat(VARIABLES[cat("azurelinux|", OS_VERSION_NUMBER, "|repo")], "/base/core:", @@ -25,7 +25,7 @@ set appDir to "/app" ^ set sha to VARIABLES[join(["aspire-dashboard", "linux", ARCH_SHORT, "sha"], "|")] -}}ARG REPO=mcr.microsoft.com/dotnet/aspnet +}}ARG REPO=mcr.microsoft.com/dotnet/runtime-deps # Installer image FROM {{installerImageTag}} AS installer{{if isInternal: @@ -46,11 +46,11 @@ RUN dotnet_aspire_version={{aspireVersion}} \ # Aspire Dashboard image -FROM {{aspnetBaseTag}} +FROM {{runtimeDepsBaseTag}} WORKDIR {{appDir}} COPY --from=installer {{appDir}} . {{InsertTemplate("Dockerfile.envs")}} -ENTRYPOINT [ "dotnet", "{{appDir}}/Aspire.Dashboard.dll" ] +ENTRYPOINT [ "{{appDir}}/Aspire.Dashboard" ] diff --git a/manifest.json b/manifest.json index 61bf1cb382..a316e1080b 100644 --- a/manifest.json +++ b/manifest.json @@ -13255,7 +13255,7 @@ "platforms": [ { "buildArgs": { - "REPO": "$(Repo:aspnet)" + "REPO": "$(Repo:runtime-deps)" }, "dockerfile": "src/aspire-dashboard/amd64", "dockerfileTemplate": "eng/dockerfile-templates/aspire-dashboard/Dockerfile.linux", @@ -13285,7 +13285,7 @@ { "architecture": "arm64", "buildArgs": { - "REPO": "$(Repo:aspnet)" + "REPO": "$(Repo:runtime-deps)" }, "dockerfile": "src/aspire-dashboard/arm64v8", "dockerfileTemplate": "eng/dockerfile-templates/aspire-dashboard/Dockerfile.linux", diff --git a/manifest.versions.json b/manifest.versions.json index b2eb041832..013fd76eb8 100644 --- a/manifest.versions.json +++ b/manifest.versions.json @@ -21,13 +21,13 @@ "alpine|9.0|floating-tag-version": "$(alpine|floating-tag-version)", "alpine|8.0|floating-tag-version": "$(alpine|floating-tag-version)", - "aspire-dashboard|build-version": "13.6.0-preview.1.26471.1", + "aspire-dashboard|build-version": "13.6.0-preview.1.26479.8", "aspire-dashboard|product-version": "13.6.0", "aspire-dashboard|fixed-tag": "13.6.0", "aspire-dashboard|minor-tag": "13.6", "aspire-dashboard|major-tag": "13", - "aspire-dashboard|linux|x64|sha": "4b7f04d2e17faa6512e5c060ef885a007eef0eccd78592773670dce7dfc33c2f205359b8e414d22b6749211493aacbe421bcdb5e8dc6c7671d362598ad5e43ac", - "aspire-dashboard|linux|arm64|sha": "03ac294885faaecdaa09f84c0984da629a2370b5899aa0343ecb81737272fd7c56154107a241ea75957a4ed85b3638d99d7c89f19a81f2fd07512a828ca92ea9", + "aspire-dashboard|linux|x64|sha": "4d047a9ee97fd3a500cf8de64a74ebd77bb3012a020bc594d9a7e4830a3f165ee0f76f6999af0e949dd8fd2cade3d32b5cd98e8a8f91015dc58fff89fb0246b5", + "aspire-dashboard|linux|arm64|sha": "b6e1ffaa74b7b8c4f38f828ac700e645cdd6133e0b8239b31373f06f6f570d9edbe9551daa9a4809c8d5ee0665dd1b8c8a000f60a802eaa2585c203830c3f56d", "aspire-dashboard|base-url|main": "$(base-url|public|preview|nightly)", "aspire-dashboard|base-url|nightly": "$(base-url|public|preview|nightly)", diff --git a/src/aspire-dashboard/amd64/Dockerfile b/src/aspire-dashboard/amd64/Dockerfile index 47d7f42d16..9404ad9a2f 100644 --- a/src/aspire-dashboard/amd64/Dockerfile +++ b/src/aspire-dashboard/amd64/Dockerfile @@ -1,4 +1,4 @@ -ARG REPO=mcr.microsoft.com/dotnet/aspnet +ARG REPO=mcr.microsoft.com/dotnet/runtime-deps # Installer image FROM mcr.microsoft.com/azurelinux/base/core:3.0 AS installer @@ -9,9 +9,9 @@ RUN tdnf install -y \ && tdnf clean all # Retrieve Aspire Dashboard -RUN dotnet_aspire_version=13.6.0-preview.1.26471.1 \ +RUN dotnet_aspire_version=13.6.0-preview.1.26479.8 \ && curl --fail --show-error --location --output aspire_dashboard.zip https://ci.dot.net/public/aspire/$dotnet_aspire_version/aspire-dashboard-linux-x64.zip \ - && aspire_dashboard_sha512='4b7f04d2e17faa6512e5c060ef885a007eef0eccd78592773670dce7dfc33c2f205359b8e414d22b6749211493aacbe421bcdb5e8dc6c7671d362598ad5e43ac' \ + && aspire_dashboard_sha512='4d047a9ee97fd3a500cf8de64a74ebd77bb3012a020bc594d9a7e4830a3f165ee0f76f6999af0e949dd8fd2cade3d32b5cd98e8a8f91015dc58fff89fb0246b5' \ && echo "$aspire_dashboard_sha512 aspire_dashboard.zip" | sha512sum -c - \ && mkdir --parents /app \ && unzip aspire_dashboard.zip -d /app \ @@ -19,7 +19,7 @@ RUN dotnet_aspire_version=13.6.0-preview.1.26471.1 \ # Aspire Dashboard image -FROM $REPO:8.0.31-azurelinux3.0-distroless-extra-amd64 +FROM $REPO:11.0.0-rc.2-azurelinux3.0-distroless-extra-amd64 WORKDIR /app COPY --from=installer /app . @@ -33,4 +33,4 @@ ENV \ DOTNET_DASHBOARD_OTLP_HTTP_ENDPOINT_URL=http://+:18890 \ DOTNET_DASHBOARD_MCP_ENDPOINT_URL=http://+:18891 -ENTRYPOINT [ "dotnet", "/app/Aspire.Dashboard.dll" ] +ENTRYPOINT [ "/app/Aspire.Dashboard" ] diff --git a/src/aspire-dashboard/arm64v8/Dockerfile b/src/aspire-dashboard/arm64v8/Dockerfile index 9d5751ba00..7923999339 100644 --- a/src/aspire-dashboard/arm64v8/Dockerfile +++ b/src/aspire-dashboard/arm64v8/Dockerfile @@ -1,4 +1,4 @@ -ARG REPO=mcr.microsoft.com/dotnet/aspnet +ARG REPO=mcr.microsoft.com/dotnet/runtime-deps # Installer image FROM mcr.microsoft.com/azurelinux/base/core:3.0 AS installer @@ -9,9 +9,9 @@ RUN tdnf install -y \ && tdnf clean all # Retrieve Aspire Dashboard -RUN dotnet_aspire_version=13.6.0-preview.1.26471.1 \ +RUN dotnet_aspire_version=13.6.0-preview.1.26479.8 \ && curl --fail --show-error --location --output aspire_dashboard.zip https://ci.dot.net/public/aspire/$dotnet_aspire_version/aspire-dashboard-linux-arm64.zip \ - && aspire_dashboard_sha512='03ac294885faaecdaa09f84c0984da629a2370b5899aa0343ecb81737272fd7c56154107a241ea75957a4ed85b3638d99d7c89f19a81f2fd07512a828ca92ea9' \ + && aspire_dashboard_sha512='b6e1ffaa74b7b8c4f38f828ac700e645cdd6133e0b8239b31373f06f6f570d9edbe9551daa9a4809c8d5ee0665dd1b8c8a000f60a802eaa2585c203830c3f56d' \ && echo "$aspire_dashboard_sha512 aspire_dashboard.zip" | sha512sum -c - \ && mkdir --parents /app \ && unzip aspire_dashboard.zip -d /app \ @@ -19,7 +19,7 @@ RUN dotnet_aspire_version=13.6.0-preview.1.26471.1 \ # Aspire Dashboard image -FROM $REPO:8.0.31-azurelinux3.0-distroless-extra-arm64v8 +FROM $REPO:11.0.0-rc.2-azurelinux3.0-distroless-extra-arm64v8 WORKDIR /app COPY --from=installer /app . @@ -33,4 +33,4 @@ ENV \ DOTNET_DASHBOARD_OTLP_HTTP_ENDPOINT_URL=http://+:18890 \ DOTNET_DASHBOARD_MCP_ENDPOINT_URL=http://+:18891 -ENTRYPOINT [ "dotnet", "/app/Aspire.Dashboard.dll" ] +ENTRYPOINT [ "/app/Aspire.Dashboard" ] diff --git a/tests/Microsoft.DotNet.Docker.Tests/AspireDashboardImageTests.cs b/tests/Microsoft.DotNet.Docker.Tests/AspireDashboardImageTests.cs index 611fadf650..efbf8a522c 100644 --- a/tests/Microsoft.DotNet.Docker.Tests/AspireDashboardImageTests.cs +++ b/tests/Microsoft.DotNet.Docker.Tests/AspireDashboardImageTests.cs @@ -62,23 +62,10 @@ public void VerifyEnvironmentVariables(ProductImageData imageData) [MemberData(nameof(GetImageData))] public void VerifyInstalledPackages(ProductImageData imageData) { - ProductImageData expectedPackagesImageData = imageData; - - // Special case for Aspire Dashboard 9.0 images: - // Aspire Dashboard 9.0 is based on .NET 8 since Azure Linux 3.0 does not yet have FedRAMP certification. - // Remove workaround once https://github.com/dotnet/dotnet-docker/issues/5375 is fixed. - if (imageData.VersionFamily == ImageVersion.V9_0) - { - expectedPackagesImageData = imageData with - { - Version = ImageVersion.V8_0 - }; - } - // Aspire Dashboard image is based on an "extra" image, but doesn't have the "extra" qualifier itself, so we // need to make sure we compare the correct lists of packages. IEnumerable expectedPackages = - GetExpectedPackages(expectedPackagesImageData with { ImageVariant = DotNetImageVariant.Extra }, ImageRepo); + GetExpectedPackages(imageData with { ImageVariant = DotNetImageVariant.Extra }, ImageRepo); IEnumerable actualPackages = GetInstalledPackages(imageData, ImageRepo, [ AppPath ]); diff --git a/tests/Microsoft.DotNet.Docker.Tests/Baselines/GeneratedArtifactTests/VerifyInternalDockerfilesOutput/aspire-dashboard-amd64-Dockerfile.approved.txt b/tests/Microsoft.DotNet.Docker.Tests/Baselines/GeneratedArtifactTests/VerifyInternalDockerfilesOutput/aspire-dashboard-amd64-Dockerfile.approved.txt index a690437680..813c345b83 100644 --- a/tests/Microsoft.DotNet.Docker.Tests/Baselines/GeneratedArtifactTests/VerifyInternalDockerfilesOutput/aspire-dashboard-amd64-Dockerfile.approved.txt +++ b/tests/Microsoft.DotNet.Docker.Tests/Baselines/GeneratedArtifactTests/VerifyInternalDockerfilesOutput/aspire-dashboard-amd64-Dockerfile.approved.txt @@ -1,4 +1,4 @@ -ARG REPO=mcr.microsoft.com/dotnet/aspnet +ARG REPO=mcr.microsoft.com/dotnet/runtime-deps # Installer image FROM mcr.microsoft.com/azurelinux/base/core:3.0 AS installer @@ -33,4 +33,4 @@ ENV \ DOTNET_DASHBOARD_OTLP_HTTP_ENDPOINT_URL=http://+:18890 \ DOTNET_DASHBOARD_MCP_ENDPOINT_URL=http://+:18891 -ENTRYPOINT [ "dotnet", "/app/Aspire.Dashboard.dll" ] +ENTRYPOINT [ "/app/Aspire.Dashboard" ] diff --git a/tests/Microsoft.DotNet.Docker.Tests/Baselines/GeneratedArtifactTests/VerifyInternalDockerfilesOutput/aspire-dashboard-arm64v8-Dockerfile.approved.txt b/tests/Microsoft.DotNet.Docker.Tests/Baselines/GeneratedArtifactTests/VerifyInternalDockerfilesOutput/aspire-dashboard-arm64v8-Dockerfile.approved.txt index e894f377b0..c99d99e028 100644 --- a/tests/Microsoft.DotNet.Docker.Tests/Baselines/GeneratedArtifactTests/VerifyInternalDockerfilesOutput/aspire-dashboard-arm64v8-Dockerfile.approved.txt +++ b/tests/Microsoft.DotNet.Docker.Tests/Baselines/GeneratedArtifactTests/VerifyInternalDockerfilesOutput/aspire-dashboard-arm64v8-Dockerfile.approved.txt @@ -1,4 +1,4 @@ -ARG REPO=mcr.microsoft.com/dotnet/aspnet +ARG REPO=mcr.microsoft.com/dotnet/runtime-deps # Installer image FROM mcr.microsoft.com/azurelinux/base/core:3.0 AS installer @@ -33,4 +33,4 @@ ENV \ DOTNET_DASHBOARD_OTLP_HTTP_ENDPOINT_URL=http://+:18890 \ DOTNET_DASHBOARD_MCP_ENDPOINT_URL=http://+:18891 -ENTRYPOINT [ "dotnet", "/app/Aspire.Dashboard.dll" ] +ENTRYPOINT [ "/app/Aspire.Dashboard" ] diff --git a/tests/Microsoft.DotNet.Docker.Tests/DockerHelper.cs b/tests/Microsoft.DotNet.Docker.Tests/DockerHelper.cs index b2007c32d6..aabca0ea08 100644 --- a/tests/Microsoft.DotNet.Docker.Tests/DockerHelper.cs +++ b/tests/Microsoft.DotNet.Docker.Tests/DockerHelper.cs @@ -123,17 +123,6 @@ public string BuildDistrolessHelper(DotNetImageRepo imageRepo, ProductImageData Arch = imageData.Arch, }; - // Special case for Aspire Dashboard 9.0 images: - // Aspire Dashboard 9.0 is based on .NET 8 since Azure Linux 3.0 does not yet have FedRAMP certification. - // Remove workaround once https://github.com/dotnet/dotnet-docker/issues/5375 is fixed. - if (imageRepo == DotNetImageRepo.Aspire_Dashboard && imageData.VersionFamily == ImageVersion.V9_0) - { - runtimeDepsImageData = runtimeDepsImageData with - { - Version = ImageVersion.V8_0 - }; - } - // Make sure we don't try to get an image that we don't need before we specify that we want the distro-full // version. The image might not be on disk. The correct, distro-full versino will be pulled in the helper // image build. diff --git a/tests/Microsoft.DotNet.Docker.Tests/ProductImageData.cs b/tests/Microsoft.DotNet.Docker.Tests/ProductImageData.cs index bd28a99e00..66f574e5fb 100644 --- a/tests/Microsoft.DotNet.Docker.Tests/ProductImageData.cs +++ b/tests/Microsoft.DotNet.Docker.Tests/ProductImageData.cs @@ -77,6 +77,12 @@ private bool SupportsGlobalization public string GetDockerfilePath(DotNetImageRepo imageRepo) { + // Aspire Dashboard Dockerfiles are not organized by product version or OS. + if (imageRepo == DotNetImageRepo.Aspire_Dashboard) + { + return $"{GetRepoSrcPath(imageRepo)}/{GetArchLabel()}"; + } + IEnumerable pathComponents = [ GetRepoSrcPath(imageRepo), diff --git a/tests/Microsoft.DotNet.Docker.Tests/TestData.cs b/tests/Microsoft.DotNet.Docker.Tests/TestData.cs index 2b614410fd..acb0fba0dd 100644 --- a/tests/Microsoft.DotNet.Docker.Tests/TestData.cs +++ b/tests/Microsoft.DotNet.Docker.Tests/TestData.cs @@ -470,7 +470,7 @@ public static class TestData { new() { Version = V13_6, - VersionFamily = V9_0, + VersionFamily = V11_0, OS = OS.AzureLinux30Distroless, OSTag = "", OSDir = OS.AzureLinuxDistroless, @@ -479,7 +479,7 @@ public static class TestData }, new() { Version = V13_6, - VersionFamily = V9_0, + VersionFamily = V11_0, OS = OS.AzureLinux30Distroless, OSTag = "", OSDir = OS.AzureLinuxDistroless, diff --git a/tests/Microsoft.DotNet.Docker.Tests/TestDataTests.cs b/tests/Microsoft.DotNet.Docker.Tests/TestDataTests.cs index 63099b1d09..d118cd6282 100644 --- a/tests/Microsoft.DotNet.Docker.Tests/TestDataTests.cs +++ b/tests/Microsoft.DotNet.Docker.Tests/TestDataTests.cs @@ -77,6 +77,45 @@ public void VerifyTestData(DotNetImageRepo imageRepo) manifestTagsByPlatform.ShouldSatisfyAllConditions(conditions); } + // Verifies that test data maps to Dockerfile paths in the manifest. Otherwise, path-filtered test runs + // silently skip the test data. SDK and runtime-deps are excluded because their test data intentionally + // includes entries without a corresponding Dockerfile (e.g. distroless SDKs, Windows runtime-deps). + [Theory] + [InlineData(DotNetImageRepo.Runtime)] + [InlineData(DotNetImageRepo.Aspnet)] + [InlineData(DotNetImageRepo.Monitor)] + [InlineData(DotNetImageRepo.Monitor_Base)] + [InlineData(DotNetImageRepo.Aspire_Dashboard)] + [InlineData(DotNetImageRepo.Yarp)] + public void VerifyTestDataDockerfilePaths(DotNetImageRepo imageRepo) + { + string repoName = ImageData.GetRepoName(ProductImageData.GetRepoName(imageRepo)); + Repo? manifestRepo = _manifest.Repos.FirstOrDefault(r => r.Name == repoName); + + // If the repo is not defined in the manifest, there are no images to test, so it's safe to return early. + // This can happen when an image repo is only published from the main branch or only from the nightly branch. + if (manifestRepo is null) + { + return; + } + + HashSet manifestDockerfilePaths = manifestRepo.Images + .SelectMany(image => image.Platforms) + .Select(platform => platform.Dockerfile) + .ToHashSet(StringComparer.OrdinalIgnoreCase); + + Action[] conditions = GetTestData(imageRepo) + .Select(productImageData => productImageData.GetDockerfilePath(imageRepo)) + .Distinct() + .Select(dockerfilePath => () => + manifestDockerfilePaths.ShouldContain( + dockerfilePath, + $"Expected test data Dockerfile path '{dockerfilePath}' to exist in the manifest.")) + .ToArray(); + + manifestDockerfilePaths.ShouldSatisfyAllConditions(conditions); + } + private static IEnumerable GetTestData(DotNetImageRepo repo) => TestData.AllImageData.Where(p => p.SupportedImageRepos.HasFlag(repo)); }