From 9960f02dd0e2f64b7e81a48626d72242a5120895 Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Thu, 15 Apr 2021 12:09:31 -0500 Subject: [PATCH 1/3] Set console formatter to JSON in ASP.NET Core images --- eng/dockerfile-templates/aspnet/6.0/Dockerfile.alpine | 7 +++++-- eng/dockerfile-templates/aspnet/6.0/Dockerfile.linux | 5 ++++- eng/dockerfile-templates/aspnet/6.0/Dockerfile.nanoserver | 5 ++++- .../aspnet/6.0/Dockerfile.windowsservercore | 5 ++++- eng/dockerfile-templates/sdk/6.0/Dockerfile.alpine | 2 ++ eng/dockerfile-templates/sdk/6.0/Dockerfile.linux | 2 ++ eng/dockerfile-templates/sdk/6.0/Dockerfile.nanoserver | 2 ++ .../sdk/6.0/Dockerfile.windowsservercore | 2 ++ src/aspnet/6.0/alpine3.13/amd64/Dockerfile | 7 +++++-- src/aspnet/6.0/alpine3.13/arm32v7/Dockerfile | 7 +++++-- src/aspnet/6.0/alpine3.13/arm64v8/Dockerfile | 7 +++++-- src/aspnet/6.0/bullseye-slim/amd64/Dockerfile | 5 ++++- src/aspnet/6.0/bullseye-slim/arm32v7/Dockerfile | 5 ++++- src/aspnet/6.0/bullseye-slim/arm64v8/Dockerfile | 5 ++++- src/aspnet/6.0/focal/amd64/Dockerfile | 5 ++++- src/aspnet/6.0/focal/arm32v7/Dockerfile | 5 ++++- src/aspnet/6.0/focal/arm64v8/Dockerfile | 5 ++++- src/aspnet/6.0/nanoserver-1809/amd64/Dockerfile | 5 ++++- src/aspnet/6.0/nanoserver-1909/amd64/Dockerfile | 5 ++++- src/aspnet/6.0/nanoserver-2004/amd64/Dockerfile | 5 ++++- src/aspnet/6.0/nanoserver-20H2/amd64/Dockerfile | 5 ++++- src/aspnet/6.0/windowsservercore-ltsc2019/amd64/Dockerfile | 5 ++++- src/sdk/6.0/alpine3.13/amd64/Dockerfile | 2 ++ src/sdk/6.0/alpine3.13/arm32v7/Dockerfile | 2 ++ src/sdk/6.0/alpine3.13/arm64v8/Dockerfile | 2 ++ src/sdk/6.0/bullseye-slim/amd64/Dockerfile | 2 ++ src/sdk/6.0/bullseye-slim/arm32v7/Dockerfile | 2 ++ src/sdk/6.0/bullseye-slim/arm64v8/Dockerfile | 2 ++ src/sdk/6.0/focal/amd64/Dockerfile | 2 ++ src/sdk/6.0/focal/arm32v7/Dockerfile | 2 ++ src/sdk/6.0/focal/arm64v8/Dockerfile | 2 ++ src/sdk/6.0/nanoserver-1809/amd64/Dockerfile | 2 ++ src/sdk/6.0/nanoserver-1909/amd64/Dockerfile | 2 ++ src/sdk/6.0/nanoserver-2004/amd64/Dockerfile | 2 ++ src/sdk/6.0/nanoserver-20H2/amd64/Dockerfile | 2 ++ src/sdk/6.0/windowsservercore-ltsc2019/amd64/Dockerfile | 2 ++ tests/Microsoft.DotNet.Docker.Tests/AspnetImageTests.cs | 5 +++++ tests/Microsoft.DotNet.Docker.Tests/SdkImageTests.cs | 1 + 38 files changed, 118 insertions(+), 22 deletions(-) diff --git a/eng/dockerfile-templates/aspnet/6.0/Dockerfile.alpine b/eng/dockerfile-templates/aspnet/6.0/Dockerfile.alpine index b20d237424..0691706167 100644 --- a/eng/dockerfile-templates/aspnet/6.0/Dockerfile.alpine +++ b/eng/dockerfile-templates/aspnet/6.0/Dockerfile.alpine @@ -1,9 +1,12 @@ ARG REPO=mcr.microsoft.com/dotnet/runtime FROM $REPO:6.0-{{OS_VERSION}}{{ARCH_TAG_SUFFIX}} -# Install ASP.NET Core -ENV ASPNET_VERSION={{VARIABLES["aspnet|6.0|build-version"]}} +ENV \ + ASPNET_VERSION={{VARIABLES["aspnet|6.0|build-version"]}} \ + # Set the default console formatter to JSON + Logging__Console__FormatterName=Json +# Install ASP.NET Core RUN wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-musl-{{ARCH_SHORT}}.tar.gz \ && aspnetcore_sha512='{{VARIABLES[cat("aspnet|6.0|linux-musl|", ARCH_SHORT, "|sha")]}}' \ && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ diff --git a/eng/dockerfile-templates/aspnet/6.0/Dockerfile.linux b/eng/dockerfile-templates/aspnet/6.0/Dockerfile.linux index 51a273b70d..41986e8c46 100644 --- a/eng/dockerfile-templates/aspnet/6.0/Dockerfile.linux +++ b/eng/dockerfile-templates/aspnet/6.0/Dockerfile.linux @@ -17,6 +17,9 @@ RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/a FROM $REPO:6.0-{{OS_VERSION}}{{ARCH_TAG_SUFFIX}} ARG ASPNET_VERSION -ENV ASPNET_VERSION=$ASPNET_VERSION +ENV \ + ASPNET_VERSION=$ASPNET_VERSION \ + # Set the default console formatter to JSON + Logging__Console__FormatterName=Json COPY --from=installer ["/shared/Microsoft.AspNetCore.App", "/usr/share/dotnet/shared/Microsoft.AspNetCore.App"] diff --git a/eng/dockerfile-templates/aspnet/6.0/Dockerfile.nanoserver b/eng/dockerfile-templates/aspnet/6.0/Dockerfile.nanoserver index 81e6f962d1..ccd1b066c3 100644 --- a/eng/dockerfile-templates/aspnet/6.0/Dockerfile.nanoserver +++ b/eng/dockerfile-templates/aspnet/6.0/Dockerfile.nanoserver @@ -26,6 +26,9 @@ RUN Invoke-WebRequest -OutFile aspnetcore.zip https://dotnetcli.azureedge.net/do FROM $REPO:6.0-{{OS_VERSION}} ARG ASPNET_VERSION -ENV ASPNET_VERSION=$ASPNET_VERSION +ENV ` + ASPNET_VERSION=$ASPNET_VERSION ` + # Set the default console formatter to JSON + Logging__Console__FormatterName=Json COPY --from=installer ["/dotnet/shared/Microsoft.AspNetCore.App", "/Program Files/dotnet/shared/Microsoft.AspNetCore.App"] diff --git a/eng/dockerfile-templates/aspnet/6.0/Dockerfile.windowsservercore b/eng/dockerfile-templates/aspnet/6.0/Dockerfile.windowsservercore index 33390c8177..3e9870a4b9 100644 --- a/eng/dockerfile-templates/aspnet/6.0/Dockerfile.windowsservercore +++ b/eng/dockerfile-templates/aspnet/6.0/Dockerfile.windowsservercore @@ -3,7 +3,10 @@ ARG REPO=mcr.microsoft.com/dotnet/runtime FROM $REPO:6.0-{{OS_VERSION}} -ENV ASPNET_VERSION={{VARIABLES["aspnet|6.0|build-version"]}} +ENV ` + ASPNET_VERSION={{VARIABLES["aspnet|6.0|build-version"]}} ` + # Set the default console formatter to JSON + Logging__Console__FormatterName=Json RUN powershell -Command ` $ErrorActionPreference = 'Stop'; ` diff --git a/eng/dockerfile-templates/sdk/6.0/Dockerfile.alpine b/eng/dockerfile-templates/sdk/6.0/Dockerfile.alpine index af62f8a5f1..7d7751eecb 100644 --- a/eng/dockerfile-templates/sdk/6.0/Dockerfile.alpine +++ b/eng/dockerfile-templates/sdk/6.0/Dockerfile.alpine @@ -14,6 +14,8 @@ ENV \ DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \ # Enable correct mode for dotnet watch (only mode supported in a container) DOTNET_USE_POLLING_FILE_WATCHER=true \ + # Unset Logging__Console__FormatterName from aspnet base image + Logging__Console__FormatterName= \ # Skip extraction of XML docs - generally not useful within an image/container - helps performance NUGET_XMLDOC_MODE=skip \ # PowerShell telemetry for docker image usage diff --git a/eng/dockerfile-templates/sdk/6.0/Dockerfile.linux b/eng/dockerfile-templates/sdk/6.0/Dockerfile.linux index 4cd89f03fa..8125535c5f 100644 --- a/eng/dockerfile-templates/sdk/6.0/Dockerfile.linux +++ b/eng/dockerfile-templates/sdk/6.0/Dockerfile.linux @@ -12,6 +12,8 @@ ENV \ DOTNET_SDK_VERSION={{VARIABLES["sdk|6.0|build-version"]}} \ # Enable correct mode for dotnet watch (only mode supported in a container) DOTNET_USE_POLLING_FILE_WATCHER=true \ + # Unset Logging__Console__FormatterName from aspnet base image + Logging__Console__FormatterName= \ # Skip extraction of XML docs - generally not useful within an image/container - helps performance NUGET_XMLDOC_MODE=skip \ # PowerShell telemetry for docker image usage diff --git a/eng/dockerfile-templates/sdk/6.0/Dockerfile.nanoserver b/eng/dockerfile-templates/sdk/6.0/Dockerfile.nanoserver index 6c9a0b34d1..646154930a 100644 --- a/eng/dockerfile-templates/sdk/6.0/Dockerfile.nanoserver +++ b/eng/dockerfile-templates/sdk/6.0/Dockerfile.nanoserver @@ -54,6 +54,8 @@ ENV ` DOTNET_SDK_VERSION=$DOTNET_SDK_VERSION ` # Enable correct mode for dotnet watch (only mode supported in a container) DOTNET_USE_POLLING_FILE_WATCHER=true ` + # Unset Logging__Console__FormatterName from aspnet base image + Logging__Console__FormatterName= ` # Skip extraction of XML docs - generally not useful within an image/container - helps performance NUGET_XMLDOC_MODE=skip ` # PowerShell telemetry for docker image usage diff --git a/eng/dockerfile-templates/sdk/6.0/Dockerfile.windowsservercore b/eng/dockerfile-templates/sdk/6.0/Dockerfile.windowsservercore index 297d05b97e..917f819807 100644 --- a/eng/dockerfile-templates/sdk/6.0/Dockerfile.windowsservercore +++ b/eng/dockerfile-templates/sdk/6.0/Dockerfile.windowsservercore @@ -14,6 +14,8 @@ ENV ` DOTNET_SDK_VERSION={{VARIABLES["sdk|6.0|build-version"]}} ` # Enable correct mode for dotnet watch (only mode supported in a container) DOTNET_USE_POLLING_FILE_WATCHER=true ` + # Unset Logging__Console__FormatterName from aspnet base image + Logging__Console__FormatterName= ` # Skip extraction of XML docs - generally not useful within an image/container - helps performance NUGET_XMLDOC_MODE=skip ` # PowerShell telemetry for docker image usage diff --git a/src/aspnet/6.0/alpine3.13/amd64/Dockerfile b/src/aspnet/6.0/alpine3.13/amd64/Dockerfile index df3c00065c..adc94a39bb 100644 --- a/src/aspnet/6.0/alpine3.13/amd64/Dockerfile +++ b/src/aspnet/6.0/alpine3.13/amd64/Dockerfile @@ -1,9 +1,12 @@ ARG REPO=mcr.microsoft.com/dotnet/runtime FROM $REPO:6.0-alpine3.13-amd64 -# Install ASP.NET Core -ENV ASPNET_VERSION=6.0.0-preview.4.21213.1 +ENV \ + ASPNET_VERSION=6.0.0-preview.4.21213.1 \ + # Set the default console formatter to JSON + Logging__Console__FormatterName=Json +# Install ASP.NET Core RUN wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-musl-x64.tar.gz \ && aspnetcore_sha512='255c894c51a7c2263b19e15382da41307eb5ee6ade959a805f55a36c51b7986a30d07ca0b944a23c18ac6da6e9b2b7deb9a156d67b8ee34aad0ff10ffef613aa' \ && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ diff --git a/src/aspnet/6.0/alpine3.13/arm32v7/Dockerfile b/src/aspnet/6.0/alpine3.13/arm32v7/Dockerfile index 77d450631a..2660db8ef7 100644 --- a/src/aspnet/6.0/alpine3.13/arm32v7/Dockerfile +++ b/src/aspnet/6.0/alpine3.13/arm32v7/Dockerfile @@ -1,9 +1,12 @@ ARG REPO=mcr.microsoft.com/dotnet/runtime FROM $REPO:6.0-alpine3.13-arm32v7 -# Install ASP.NET Core -ENV ASPNET_VERSION=6.0.0-preview.4.21213.1 +ENV \ + ASPNET_VERSION=6.0.0-preview.4.21213.1 \ + # Set the default console formatter to JSON + Logging__Console__FormatterName=Json +# Install ASP.NET Core RUN wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-musl-arm.tar.gz \ && aspnetcore_sha512='e4bd8c2abac5e92f5efae6f40f0423d469e221cf0652d151b90e488fa9479e0ef5958497684ae811eb306a351fc625f84be1bd97842b86f138479ac9ddeabdc4' \ && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ diff --git a/src/aspnet/6.0/alpine3.13/arm64v8/Dockerfile b/src/aspnet/6.0/alpine3.13/arm64v8/Dockerfile index cb5fc9330b..0ccc5c0501 100644 --- a/src/aspnet/6.0/alpine3.13/arm64v8/Dockerfile +++ b/src/aspnet/6.0/alpine3.13/arm64v8/Dockerfile @@ -1,9 +1,12 @@ ARG REPO=mcr.microsoft.com/dotnet/runtime FROM $REPO:6.0-alpine3.13-arm64v8 -# Install ASP.NET Core -ENV ASPNET_VERSION=6.0.0-preview.4.21213.1 +ENV \ + ASPNET_VERSION=6.0.0-preview.4.21213.1 \ + # Set the default console formatter to JSON + Logging__Console__FormatterName=Json +# Install ASP.NET Core RUN wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-musl-arm64.tar.gz \ && aspnetcore_sha512='b2b8f2981247e2158a42d73dc02b09879bb626f7e97b0637dad6c971ca1aed0eed6200b5574c5a5ea836bf3b8344de3ffe925256c528268a04195a92a0d3b3a8' \ && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ diff --git a/src/aspnet/6.0/bullseye-slim/amd64/Dockerfile b/src/aspnet/6.0/bullseye-slim/amd64/Dockerfile index 89ae5d0d1d..8a461891ed 100644 --- a/src/aspnet/6.0/bullseye-slim/amd64/Dockerfile +++ b/src/aspnet/6.0/bullseye-slim/amd64/Dockerfile @@ -17,6 +17,9 @@ RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/a FROM $REPO:6.0-bullseye-slim-amd64 ARG ASPNET_VERSION -ENV ASPNET_VERSION=$ASPNET_VERSION +ENV \ + ASPNET_VERSION=$ASPNET_VERSION \ + # Set the default console formatter to JSON + Logging__Console__FormatterName=Json COPY --from=installer ["/shared/Microsoft.AspNetCore.App", "/usr/share/dotnet/shared/Microsoft.AspNetCore.App"] diff --git a/src/aspnet/6.0/bullseye-slim/arm32v7/Dockerfile b/src/aspnet/6.0/bullseye-slim/arm32v7/Dockerfile index 8ea930b01e..3701737298 100644 --- a/src/aspnet/6.0/bullseye-slim/arm32v7/Dockerfile +++ b/src/aspnet/6.0/bullseye-slim/arm32v7/Dockerfile @@ -17,6 +17,9 @@ RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/a FROM $REPO:6.0-bullseye-slim-arm32v7 ARG ASPNET_VERSION -ENV ASPNET_VERSION=$ASPNET_VERSION +ENV \ + ASPNET_VERSION=$ASPNET_VERSION \ + # Set the default console formatter to JSON + Logging__Console__FormatterName=Json COPY --from=installer ["/shared/Microsoft.AspNetCore.App", "/usr/share/dotnet/shared/Microsoft.AspNetCore.App"] diff --git a/src/aspnet/6.0/bullseye-slim/arm64v8/Dockerfile b/src/aspnet/6.0/bullseye-slim/arm64v8/Dockerfile index c8a026c7cf..9dfc5cb61b 100644 --- a/src/aspnet/6.0/bullseye-slim/arm64v8/Dockerfile +++ b/src/aspnet/6.0/bullseye-slim/arm64v8/Dockerfile @@ -17,6 +17,9 @@ RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/a FROM $REPO:6.0-bullseye-slim-arm64v8 ARG ASPNET_VERSION -ENV ASPNET_VERSION=$ASPNET_VERSION +ENV \ + ASPNET_VERSION=$ASPNET_VERSION \ + # Set the default console formatter to JSON + Logging__Console__FormatterName=Json COPY --from=installer ["/shared/Microsoft.AspNetCore.App", "/usr/share/dotnet/shared/Microsoft.AspNetCore.App"] diff --git a/src/aspnet/6.0/focal/amd64/Dockerfile b/src/aspnet/6.0/focal/amd64/Dockerfile index d5b19c33fc..2979722854 100644 --- a/src/aspnet/6.0/focal/amd64/Dockerfile +++ b/src/aspnet/6.0/focal/amd64/Dockerfile @@ -17,6 +17,9 @@ RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/a FROM $REPO:6.0-focal-amd64 ARG ASPNET_VERSION -ENV ASPNET_VERSION=$ASPNET_VERSION +ENV \ + ASPNET_VERSION=$ASPNET_VERSION \ + # Set the default console formatter to JSON + Logging__Console__FormatterName=Json COPY --from=installer ["/shared/Microsoft.AspNetCore.App", "/usr/share/dotnet/shared/Microsoft.AspNetCore.App"] diff --git a/src/aspnet/6.0/focal/arm32v7/Dockerfile b/src/aspnet/6.0/focal/arm32v7/Dockerfile index 98d984ffa3..48c2e98594 100644 --- a/src/aspnet/6.0/focal/arm32v7/Dockerfile +++ b/src/aspnet/6.0/focal/arm32v7/Dockerfile @@ -17,6 +17,9 @@ RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/a FROM $REPO:6.0-focal-arm32v7 ARG ASPNET_VERSION -ENV ASPNET_VERSION=$ASPNET_VERSION +ENV \ + ASPNET_VERSION=$ASPNET_VERSION \ + # Set the default console formatter to JSON + Logging__Console__FormatterName=Json COPY --from=installer ["/shared/Microsoft.AspNetCore.App", "/usr/share/dotnet/shared/Microsoft.AspNetCore.App"] diff --git a/src/aspnet/6.0/focal/arm64v8/Dockerfile b/src/aspnet/6.0/focal/arm64v8/Dockerfile index 6897b96011..442725b582 100644 --- a/src/aspnet/6.0/focal/arm64v8/Dockerfile +++ b/src/aspnet/6.0/focal/arm64v8/Dockerfile @@ -17,6 +17,9 @@ RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/a FROM $REPO:6.0-focal-arm64v8 ARG ASPNET_VERSION -ENV ASPNET_VERSION=$ASPNET_VERSION +ENV \ + ASPNET_VERSION=$ASPNET_VERSION \ + # Set the default console formatter to JSON + Logging__Console__FormatterName=Json COPY --from=installer ["/shared/Microsoft.AspNetCore.App", "/usr/share/dotnet/shared/Microsoft.AspNetCore.App"] diff --git a/src/aspnet/6.0/nanoserver-1809/amd64/Dockerfile b/src/aspnet/6.0/nanoserver-1809/amd64/Dockerfile index 9a06de6f86..0c71aa09da 100644 --- a/src/aspnet/6.0/nanoserver-1809/amd64/Dockerfile +++ b/src/aspnet/6.0/nanoserver-1809/amd64/Dockerfile @@ -26,6 +26,9 @@ RUN Invoke-WebRequest -OutFile aspnetcore.zip https://dotnetcli.azureedge.net/do FROM $REPO:6.0-nanoserver-1809 ARG ASPNET_VERSION -ENV ASPNET_VERSION=$ASPNET_VERSION +ENV ` + ASPNET_VERSION=$ASPNET_VERSION ` + # Set the default console formatter to JSON + Logging__Console__FormatterName=Json COPY --from=installer ["/dotnet/shared/Microsoft.AspNetCore.App", "/Program Files/dotnet/shared/Microsoft.AspNetCore.App"] diff --git a/src/aspnet/6.0/nanoserver-1909/amd64/Dockerfile b/src/aspnet/6.0/nanoserver-1909/amd64/Dockerfile index 4a3e06ca6e..78f102a9d0 100644 --- a/src/aspnet/6.0/nanoserver-1909/amd64/Dockerfile +++ b/src/aspnet/6.0/nanoserver-1909/amd64/Dockerfile @@ -26,6 +26,9 @@ RUN Invoke-WebRequest -OutFile aspnetcore.zip https://dotnetcli.azureedge.net/do FROM $REPO:6.0-nanoserver-1909 ARG ASPNET_VERSION -ENV ASPNET_VERSION=$ASPNET_VERSION +ENV ` + ASPNET_VERSION=$ASPNET_VERSION ` + # Set the default console formatter to JSON + Logging__Console__FormatterName=Json COPY --from=installer ["/dotnet/shared/Microsoft.AspNetCore.App", "/Program Files/dotnet/shared/Microsoft.AspNetCore.App"] diff --git a/src/aspnet/6.0/nanoserver-2004/amd64/Dockerfile b/src/aspnet/6.0/nanoserver-2004/amd64/Dockerfile index 8c3d39547d..baa5bdf843 100644 --- a/src/aspnet/6.0/nanoserver-2004/amd64/Dockerfile +++ b/src/aspnet/6.0/nanoserver-2004/amd64/Dockerfile @@ -26,6 +26,9 @@ RUN Invoke-WebRequest -OutFile aspnetcore.zip https://dotnetcli.azureedge.net/do FROM $REPO:6.0-nanoserver-2004 ARG ASPNET_VERSION -ENV ASPNET_VERSION=$ASPNET_VERSION +ENV ` + ASPNET_VERSION=$ASPNET_VERSION ` + # Set the default console formatter to JSON + Logging__Console__FormatterName=Json COPY --from=installer ["/dotnet/shared/Microsoft.AspNetCore.App", "/Program Files/dotnet/shared/Microsoft.AspNetCore.App"] diff --git a/src/aspnet/6.0/nanoserver-20H2/amd64/Dockerfile b/src/aspnet/6.0/nanoserver-20H2/amd64/Dockerfile index 7e9ffd4ef1..4b059d72fc 100644 --- a/src/aspnet/6.0/nanoserver-20H2/amd64/Dockerfile +++ b/src/aspnet/6.0/nanoserver-20H2/amd64/Dockerfile @@ -26,6 +26,9 @@ RUN Invoke-WebRequest -OutFile aspnetcore.zip https://dotnetcli.azureedge.net/do FROM $REPO:6.0-nanoserver-20H2 ARG ASPNET_VERSION -ENV ASPNET_VERSION=$ASPNET_VERSION +ENV ` + ASPNET_VERSION=$ASPNET_VERSION ` + # Set the default console formatter to JSON + Logging__Console__FormatterName=Json COPY --from=installer ["/dotnet/shared/Microsoft.AspNetCore.App", "/Program Files/dotnet/shared/Microsoft.AspNetCore.App"] diff --git a/src/aspnet/6.0/windowsservercore-ltsc2019/amd64/Dockerfile b/src/aspnet/6.0/windowsservercore-ltsc2019/amd64/Dockerfile index 230af7a724..f0bd5f76f9 100644 --- a/src/aspnet/6.0/windowsservercore-ltsc2019/amd64/Dockerfile +++ b/src/aspnet/6.0/windowsservercore-ltsc2019/amd64/Dockerfile @@ -3,7 +3,10 @@ ARG REPO=mcr.microsoft.com/dotnet/runtime FROM $REPO:6.0-windowsservercore-ltsc2019 -ENV ASPNET_VERSION=6.0.0-preview.4.21213.1 +ENV ` + ASPNET_VERSION=6.0.0-preview.4.21213.1 ` + # Set the default console formatter to JSON + Logging__Console__FormatterName=Json RUN powershell -Command ` $ErrorActionPreference = 'Stop'; ` diff --git a/src/sdk/6.0/alpine3.13/amd64/Dockerfile b/src/sdk/6.0/alpine3.13/amd64/Dockerfile index 34d022704b..e3d6aed7ff 100644 --- a/src/sdk/6.0/alpine3.13/amd64/Dockerfile +++ b/src/sdk/6.0/alpine3.13/amd64/Dockerfile @@ -14,6 +14,8 @@ ENV \ DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \ # Enable correct mode for dotnet watch (only mode supported in a container) DOTNET_USE_POLLING_FILE_WATCHER=true \ + # Unset Logging__Console__FormatterName from aspnet base image + Logging__Console__FormatterName= \ # Skip extraction of XML docs - generally not useful within an image/container - helps performance NUGET_XMLDOC_MODE=skip \ # PowerShell telemetry for docker image usage diff --git a/src/sdk/6.0/alpine3.13/arm32v7/Dockerfile b/src/sdk/6.0/alpine3.13/arm32v7/Dockerfile index 3b9a81b766..b8f0e28775 100644 --- a/src/sdk/6.0/alpine3.13/arm32v7/Dockerfile +++ b/src/sdk/6.0/alpine3.13/arm32v7/Dockerfile @@ -14,6 +14,8 @@ ENV \ DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \ # Enable correct mode for dotnet watch (only mode supported in a container) DOTNET_USE_POLLING_FILE_WATCHER=true \ + # Unset Logging__Console__FormatterName from aspnet base image + Logging__Console__FormatterName= \ # Skip extraction of XML docs - generally not useful within an image/container - helps performance NUGET_XMLDOC_MODE=skip \ # PowerShell telemetry for docker image usage diff --git a/src/sdk/6.0/alpine3.13/arm64v8/Dockerfile b/src/sdk/6.0/alpine3.13/arm64v8/Dockerfile index 53acdd3787..360a887dd6 100644 --- a/src/sdk/6.0/alpine3.13/arm64v8/Dockerfile +++ b/src/sdk/6.0/alpine3.13/arm64v8/Dockerfile @@ -14,6 +14,8 @@ ENV \ DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \ # Enable correct mode for dotnet watch (only mode supported in a container) DOTNET_USE_POLLING_FILE_WATCHER=true \ + # Unset Logging__Console__FormatterName from aspnet base image + Logging__Console__FormatterName= \ # Skip extraction of XML docs - generally not useful within an image/container - helps performance NUGET_XMLDOC_MODE=skip \ # PowerShell telemetry for docker image usage diff --git a/src/sdk/6.0/bullseye-slim/amd64/Dockerfile b/src/sdk/6.0/bullseye-slim/amd64/Dockerfile index c022634d4d..0e59235260 100644 --- a/src/sdk/6.0/bullseye-slim/amd64/Dockerfile +++ b/src/sdk/6.0/bullseye-slim/amd64/Dockerfile @@ -12,6 +12,8 @@ ENV \ DOTNET_SDK_VERSION=6.0.100-preview.4.21215.1 \ # Enable correct mode for dotnet watch (only mode supported in a container) DOTNET_USE_POLLING_FILE_WATCHER=true \ + # Unset Logging__Console__FormatterName from aspnet base image + Logging__Console__FormatterName= \ # Skip extraction of XML docs - generally not useful within an image/container - helps performance NUGET_XMLDOC_MODE=skip \ # PowerShell telemetry for docker image usage diff --git a/src/sdk/6.0/bullseye-slim/arm32v7/Dockerfile b/src/sdk/6.0/bullseye-slim/arm32v7/Dockerfile index eb8d4ac7f8..bd0b55e21e 100644 --- a/src/sdk/6.0/bullseye-slim/arm32v7/Dockerfile +++ b/src/sdk/6.0/bullseye-slim/arm32v7/Dockerfile @@ -12,6 +12,8 @@ ENV \ DOTNET_SDK_VERSION=6.0.100-preview.4.21215.1 \ # Enable correct mode for dotnet watch (only mode supported in a container) DOTNET_USE_POLLING_FILE_WATCHER=true \ + # Unset Logging__Console__FormatterName from aspnet base image + Logging__Console__FormatterName= \ # Skip extraction of XML docs - generally not useful within an image/container - helps performance NUGET_XMLDOC_MODE=skip \ # PowerShell telemetry for docker image usage diff --git a/src/sdk/6.0/bullseye-slim/arm64v8/Dockerfile b/src/sdk/6.0/bullseye-slim/arm64v8/Dockerfile index 3e78ee0266..4d20ccec60 100644 --- a/src/sdk/6.0/bullseye-slim/arm64v8/Dockerfile +++ b/src/sdk/6.0/bullseye-slim/arm64v8/Dockerfile @@ -12,6 +12,8 @@ ENV \ DOTNET_SDK_VERSION=6.0.100-preview.4.21215.1 \ # Enable correct mode for dotnet watch (only mode supported in a container) DOTNET_USE_POLLING_FILE_WATCHER=true \ + # Unset Logging__Console__FormatterName from aspnet base image + Logging__Console__FormatterName= \ # Skip extraction of XML docs - generally not useful within an image/container - helps performance NUGET_XMLDOC_MODE=skip \ # PowerShell telemetry for docker image usage diff --git a/src/sdk/6.0/focal/amd64/Dockerfile b/src/sdk/6.0/focal/amd64/Dockerfile index 746a6978b6..d0d08a6c8d 100644 --- a/src/sdk/6.0/focal/amd64/Dockerfile +++ b/src/sdk/6.0/focal/amd64/Dockerfile @@ -12,6 +12,8 @@ ENV \ DOTNET_SDK_VERSION=6.0.100-preview.4.21215.1 \ # Enable correct mode for dotnet watch (only mode supported in a container) DOTNET_USE_POLLING_FILE_WATCHER=true \ + # Unset Logging__Console__FormatterName from aspnet base image + Logging__Console__FormatterName= \ # Skip extraction of XML docs - generally not useful within an image/container - helps performance NUGET_XMLDOC_MODE=skip \ # PowerShell telemetry for docker image usage diff --git a/src/sdk/6.0/focal/arm32v7/Dockerfile b/src/sdk/6.0/focal/arm32v7/Dockerfile index 61c49f5607..365efd633d 100644 --- a/src/sdk/6.0/focal/arm32v7/Dockerfile +++ b/src/sdk/6.0/focal/arm32v7/Dockerfile @@ -12,6 +12,8 @@ ENV \ DOTNET_SDK_VERSION=6.0.100-preview.4.21215.1 \ # Enable correct mode for dotnet watch (only mode supported in a container) DOTNET_USE_POLLING_FILE_WATCHER=true \ + # Unset Logging__Console__FormatterName from aspnet base image + Logging__Console__FormatterName= \ # Skip extraction of XML docs - generally not useful within an image/container - helps performance NUGET_XMLDOC_MODE=skip \ # PowerShell telemetry for docker image usage diff --git a/src/sdk/6.0/focal/arm64v8/Dockerfile b/src/sdk/6.0/focal/arm64v8/Dockerfile index bb518c2e13..61a8830e1b 100644 --- a/src/sdk/6.0/focal/arm64v8/Dockerfile +++ b/src/sdk/6.0/focal/arm64v8/Dockerfile @@ -12,6 +12,8 @@ ENV \ DOTNET_SDK_VERSION=6.0.100-preview.4.21215.1 \ # Enable correct mode for dotnet watch (only mode supported in a container) DOTNET_USE_POLLING_FILE_WATCHER=true \ + # Unset Logging__Console__FormatterName from aspnet base image + Logging__Console__FormatterName= \ # Skip extraction of XML docs - generally not useful within an image/container - helps performance NUGET_XMLDOC_MODE=skip \ # PowerShell telemetry for docker image usage diff --git a/src/sdk/6.0/nanoserver-1809/amd64/Dockerfile b/src/sdk/6.0/nanoserver-1809/amd64/Dockerfile index a954999c92..a7c4210bcf 100644 --- a/src/sdk/6.0/nanoserver-1809/amd64/Dockerfile +++ b/src/sdk/6.0/nanoserver-1809/amd64/Dockerfile @@ -54,6 +54,8 @@ ENV ` DOTNET_SDK_VERSION=$DOTNET_SDK_VERSION ` # Enable correct mode for dotnet watch (only mode supported in a container) DOTNET_USE_POLLING_FILE_WATCHER=true ` + # Unset Logging__Console__FormatterName from aspnet base image + Logging__Console__FormatterName= ` # Skip extraction of XML docs - generally not useful within an image/container - helps performance NUGET_XMLDOC_MODE=skip ` # PowerShell telemetry for docker image usage diff --git a/src/sdk/6.0/nanoserver-1909/amd64/Dockerfile b/src/sdk/6.0/nanoserver-1909/amd64/Dockerfile index 8f572ad8cb..275d9b37b5 100644 --- a/src/sdk/6.0/nanoserver-1909/amd64/Dockerfile +++ b/src/sdk/6.0/nanoserver-1909/amd64/Dockerfile @@ -54,6 +54,8 @@ ENV ` DOTNET_SDK_VERSION=$DOTNET_SDK_VERSION ` # Enable correct mode for dotnet watch (only mode supported in a container) DOTNET_USE_POLLING_FILE_WATCHER=true ` + # Unset Logging__Console__FormatterName from aspnet base image + Logging__Console__FormatterName= ` # Skip extraction of XML docs - generally not useful within an image/container - helps performance NUGET_XMLDOC_MODE=skip ` # PowerShell telemetry for docker image usage diff --git a/src/sdk/6.0/nanoserver-2004/amd64/Dockerfile b/src/sdk/6.0/nanoserver-2004/amd64/Dockerfile index fe62fc3a74..d5314b25ff 100644 --- a/src/sdk/6.0/nanoserver-2004/amd64/Dockerfile +++ b/src/sdk/6.0/nanoserver-2004/amd64/Dockerfile @@ -54,6 +54,8 @@ ENV ` DOTNET_SDK_VERSION=$DOTNET_SDK_VERSION ` # Enable correct mode for dotnet watch (only mode supported in a container) DOTNET_USE_POLLING_FILE_WATCHER=true ` + # Unset Logging__Console__FormatterName from aspnet base image + Logging__Console__FormatterName= ` # Skip extraction of XML docs - generally not useful within an image/container - helps performance NUGET_XMLDOC_MODE=skip ` # PowerShell telemetry for docker image usage diff --git a/src/sdk/6.0/nanoserver-20H2/amd64/Dockerfile b/src/sdk/6.0/nanoserver-20H2/amd64/Dockerfile index c4c7091792..c28cf51a26 100644 --- a/src/sdk/6.0/nanoserver-20H2/amd64/Dockerfile +++ b/src/sdk/6.0/nanoserver-20H2/amd64/Dockerfile @@ -54,6 +54,8 @@ ENV ` DOTNET_SDK_VERSION=$DOTNET_SDK_VERSION ` # Enable correct mode for dotnet watch (only mode supported in a container) DOTNET_USE_POLLING_FILE_WATCHER=true ` + # Unset Logging__Console__FormatterName from aspnet base image + Logging__Console__FormatterName= ` # Skip extraction of XML docs - generally not useful within an image/container - helps performance NUGET_XMLDOC_MODE=skip ` # PowerShell telemetry for docker image usage diff --git a/src/sdk/6.0/windowsservercore-ltsc2019/amd64/Dockerfile b/src/sdk/6.0/windowsservercore-ltsc2019/amd64/Dockerfile index 014814ccd0..f1f95287cc 100644 --- a/src/sdk/6.0/windowsservercore-ltsc2019/amd64/Dockerfile +++ b/src/sdk/6.0/windowsservercore-ltsc2019/amd64/Dockerfile @@ -14,6 +14,8 @@ ENV ` DOTNET_SDK_VERSION=6.0.100-preview.4.21215.1 ` # Enable correct mode for dotnet watch (only mode supported in a container) DOTNET_USE_POLLING_FILE_WATCHER=true ` + # Unset Logging__Console__FormatterName from aspnet base image + Logging__Console__FormatterName= ` # Skip extraction of XML docs - generally not useful within an image/container - helps performance NUGET_XMLDOC_MODE=skip ` # PowerShell telemetry for docker image usage diff --git a/tests/Microsoft.DotNet.Docker.Tests/AspnetImageTests.cs b/tests/Microsoft.DotNet.Docker.Tests/AspnetImageTests.cs index 94ca06634c..12ef770e2c 100644 --- a/tests/Microsoft.DotNet.Docker.Tests/AspnetImageTests.cs +++ b/tests/Microsoft.DotNet.Docker.Tests/AspnetImageTests.cs @@ -50,6 +50,11 @@ public void VerifyEnvironmentVariables(ProductImageData imageData) variables.Add(RuntimeImageTests.GetRuntimeVersionVariableInfo(imageData, DockerHelper)); } + if (imageData.Version.Major >= 6) + { + variables.Add(new EnvironmentVariableInfo("Logging__Console__FormatterName", "Json")); + } + base.VerifyCommonEnvironmentVariables(imageData, variables); } diff --git a/tests/Microsoft.DotNet.Docker.Tests/SdkImageTests.cs b/tests/Microsoft.DotNet.Docker.Tests/SdkImageTests.cs index 5ddc94c846..c6251c4359 100644 --- a/tests/Microsoft.DotNet.Docker.Tests/SdkImageTests.cs +++ b/tests/Microsoft.DotNet.Docker.Tests/SdkImageTests.cs @@ -79,6 +79,7 @@ public void VerifyEnvironmentVariables(ProductImageData imageData) { variables.Add(new EnvironmentVariableInfo("DOTNET_GENERATE_ASPNET_CERTIFICATE", "false")); variables.Add(new EnvironmentVariableInfo("DOTNET_NOLOGO", "true")); + variables.Add(new EnvironmentVariableInfo("Logging__Console__FormatterName", string.Empty)); } if (imageData.SdkOS.StartsWith(OS.AlpinePrefix)) From 55b7afbaa43cfe0541406d01fc605d09f8ddb395 Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Mon, 19 Apr 2021 09:53:07 -0500 Subject: [PATCH 2/3] Add comment for ASPNET_VERSION variable --- eng/dockerfile-templates/aspnet/6.0/Dockerfile.alpine | 1 + eng/dockerfile-templates/aspnet/6.0/Dockerfile.linux | 1 + eng/dockerfile-templates/aspnet/6.0/Dockerfile.nanoserver | 1 + eng/dockerfile-templates/aspnet/6.0/Dockerfile.windowsservercore | 1 + 4 files changed, 4 insertions(+) diff --git a/eng/dockerfile-templates/aspnet/6.0/Dockerfile.alpine b/eng/dockerfile-templates/aspnet/6.0/Dockerfile.alpine index 0691706167..ffb6a05a47 100644 --- a/eng/dockerfile-templates/aspnet/6.0/Dockerfile.alpine +++ b/eng/dockerfile-templates/aspnet/6.0/Dockerfile.alpine @@ -2,6 +2,7 @@ ARG REPO=mcr.microsoft.com/dotnet/runtime FROM $REPO:6.0-{{OS_VERSION}}{{ARCH_TAG_SUFFIX}} ENV \ + # ASP.NET Core version ASPNET_VERSION={{VARIABLES["aspnet|6.0|build-version"]}} \ # Set the default console formatter to JSON Logging__Console__FormatterName=Json diff --git a/eng/dockerfile-templates/aspnet/6.0/Dockerfile.linux b/eng/dockerfile-templates/aspnet/6.0/Dockerfile.linux index 41986e8c46..0c3f0345a5 100644 --- a/eng/dockerfile-templates/aspnet/6.0/Dockerfile.linux +++ b/eng/dockerfile-templates/aspnet/6.0/Dockerfile.linux @@ -18,6 +18,7 @@ FROM $REPO:6.0-{{OS_VERSION}}{{ARCH_TAG_SUFFIX}} ARG ASPNET_VERSION ENV \ + # ASP.NET Core version ASPNET_VERSION=$ASPNET_VERSION \ # Set the default console formatter to JSON Logging__Console__FormatterName=Json diff --git a/eng/dockerfile-templates/aspnet/6.0/Dockerfile.nanoserver b/eng/dockerfile-templates/aspnet/6.0/Dockerfile.nanoserver index ccd1b066c3..38f47532ea 100644 --- a/eng/dockerfile-templates/aspnet/6.0/Dockerfile.nanoserver +++ b/eng/dockerfile-templates/aspnet/6.0/Dockerfile.nanoserver @@ -27,6 +27,7 @@ FROM $REPO:6.0-{{OS_VERSION}} ARG ASPNET_VERSION ENV ` + # ASP.NET Core version ASPNET_VERSION=$ASPNET_VERSION ` # Set the default console formatter to JSON Logging__Console__FormatterName=Json diff --git a/eng/dockerfile-templates/aspnet/6.0/Dockerfile.windowsservercore b/eng/dockerfile-templates/aspnet/6.0/Dockerfile.windowsservercore index 3e9870a4b9..3cd1426f16 100644 --- a/eng/dockerfile-templates/aspnet/6.0/Dockerfile.windowsservercore +++ b/eng/dockerfile-templates/aspnet/6.0/Dockerfile.windowsservercore @@ -4,6 +4,7 @@ ARG REPO=mcr.microsoft.com/dotnet/runtime FROM $REPO:6.0-{{OS_VERSION}} ENV ` + # ASP.NET Core version ASPNET_VERSION={{VARIABLES["aspnet|6.0|build-version"]}} ` # Set the default console formatter to JSON Logging__Console__FormatterName=Json From 4d006ecc50813dd9b5307c1e88bbab4b7fba76c1 Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Mon, 19 Apr 2021 09:57:21 -0500 Subject: [PATCH 3/3] Apply Dockerfile template updates --- src/aspnet/6.0/alpine3.13/amd64/Dockerfile | 1 + src/aspnet/6.0/alpine3.13/arm32v7/Dockerfile | 1 + src/aspnet/6.0/alpine3.13/arm64v8/Dockerfile | 1 + src/aspnet/6.0/bullseye-slim/amd64/Dockerfile | 1 + src/aspnet/6.0/bullseye-slim/arm32v7/Dockerfile | 1 + src/aspnet/6.0/bullseye-slim/arm64v8/Dockerfile | 1 + src/aspnet/6.0/focal/amd64/Dockerfile | 1 + src/aspnet/6.0/focal/arm32v7/Dockerfile | 1 + src/aspnet/6.0/focal/arm64v8/Dockerfile | 1 + src/aspnet/6.0/nanoserver-1809/amd64/Dockerfile | 1 + src/aspnet/6.0/nanoserver-1909/amd64/Dockerfile | 1 + src/aspnet/6.0/nanoserver-2004/amd64/Dockerfile | 1 + src/aspnet/6.0/nanoserver-20H2/amd64/Dockerfile | 1 + src/aspnet/6.0/windowsservercore-ltsc2019/amd64/Dockerfile | 1 + 14 files changed, 14 insertions(+) diff --git a/src/aspnet/6.0/alpine3.13/amd64/Dockerfile b/src/aspnet/6.0/alpine3.13/amd64/Dockerfile index adc94a39bb..4b314154b3 100644 --- a/src/aspnet/6.0/alpine3.13/amd64/Dockerfile +++ b/src/aspnet/6.0/alpine3.13/amd64/Dockerfile @@ -2,6 +2,7 @@ ARG REPO=mcr.microsoft.com/dotnet/runtime FROM $REPO:6.0-alpine3.13-amd64 ENV \ + # ASP.NET Core version ASPNET_VERSION=6.0.0-preview.4.21213.1 \ # Set the default console formatter to JSON Logging__Console__FormatterName=Json diff --git a/src/aspnet/6.0/alpine3.13/arm32v7/Dockerfile b/src/aspnet/6.0/alpine3.13/arm32v7/Dockerfile index 2660db8ef7..b6c5877085 100644 --- a/src/aspnet/6.0/alpine3.13/arm32v7/Dockerfile +++ b/src/aspnet/6.0/alpine3.13/arm32v7/Dockerfile @@ -2,6 +2,7 @@ ARG REPO=mcr.microsoft.com/dotnet/runtime FROM $REPO:6.0-alpine3.13-arm32v7 ENV \ + # ASP.NET Core version ASPNET_VERSION=6.0.0-preview.4.21213.1 \ # Set the default console formatter to JSON Logging__Console__FormatterName=Json diff --git a/src/aspnet/6.0/alpine3.13/arm64v8/Dockerfile b/src/aspnet/6.0/alpine3.13/arm64v8/Dockerfile index 0ccc5c0501..8a3a384cd5 100644 --- a/src/aspnet/6.0/alpine3.13/arm64v8/Dockerfile +++ b/src/aspnet/6.0/alpine3.13/arm64v8/Dockerfile @@ -2,6 +2,7 @@ ARG REPO=mcr.microsoft.com/dotnet/runtime FROM $REPO:6.0-alpine3.13-arm64v8 ENV \ + # ASP.NET Core version ASPNET_VERSION=6.0.0-preview.4.21213.1 \ # Set the default console formatter to JSON Logging__Console__FormatterName=Json diff --git a/src/aspnet/6.0/bullseye-slim/amd64/Dockerfile b/src/aspnet/6.0/bullseye-slim/amd64/Dockerfile index 8a461891ed..a39189b41a 100644 --- a/src/aspnet/6.0/bullseye-slim/amd64/Dockerfile +++ b/src/aspnet/6.0/bullseye-slim/amd64/Dockerfile @@ -18,6 +18,7 @@ FROM $REPO:6.0-bullseye-slim-amd64 ARG ASPNET_VERSION ENV \ + # ASP.NET Core version ASPNET_VERSION=$ASPNET_VERSION \ # Set the default console formatter to JSON Logging__Console__FormatterName=Json diff --git a/src/aspnet/6.0/bullseye-slim/arm32v7/Dockerfile b/src/aspnet/6.0/bullseye-slim/arm32v7/Dockerfile index 3701737298..9217c3cdae 100644 --- a/src/aspnet/6.0/bullseye-slim/arm32v7/Dockerfile +++ b/src/aspnet/6.0/bullseye-slim/arm32v7/Dockerfile @@ -18,6 +18,7 @@ FROM $REPO:6.0-bullseye-slim-arm32v7 ARG ASPNET_VERSION ENV \ + # ASP.NET Core version ASPNET_VERSION=$ASPNET_VERSION \ # Set the default console formatter to JSON Logging__Console__FormatterName=Json diff --git a/src/aspnet/6.0/bullseye-slim/arm64v8/Dockerfile b/src/aspnet/6.0/bullseye-slim/arm64v8/Dockerfile index 9dfc5cb61b..dfc15dec71 100644 --- a/src/aspnet/6.0/bullseye-slim/arm64v8/Dockerfile +++ b/src/aspnet/6.0/bullseye-slim/arm64v8/Dockerfile @@ -18,6 +18,7 @@ FROM $REPO:6.0-bullseye-slim-arm64v8 ARG ASPNET_VERSION ENV \ + # ASP.NET Core version ASPNET_VERSION=$ASPNET_VERSION \ # Set the default console formatter to JSON Logging__Console__FormatterName=Json diff --git a/src/aspnet/6.0/focal/amd64/Dockerfile b/src/aspnet/6.0/focal/amd64/Dockerfile index 2979722854..2a82cd1de7 100644 --- a/src/aspnet/6.0/focal/amd64/Dockerfile +++ b/src/aspnet/6.0/focal/amd64/Dockerfile @@ -18,6 +18,7 @@ FROM $REPO:6.0-focal-amd64 ARG ASPNET_VERSION ENV \ + # ASP.NET Core version ASPNET_VERSION=$ASPNET_VERSION \ # Set the default console formatter to JSON Logging__Console__FormatterName=Json diff --git a/src/aspnet/6.0/focal/arm32v7/Dockerfile b/src/aspnet/6.0/focal/arm32v7/Dockerfile index 48c2e98594..a688d47666 100644 --- a/src/aspnet/6.0/focal/arm32v7/Dockerfile +++ b/src/aspnet/6.0/focal/arm32v7/Dockerfile @@ -18,6 +18,7 @@ FROM $REPO:6.0-focal-arm32v7 ARG ASPNET_VERSION ENV \ + # ASP.NET Core version ASPNET_VERSION=$ASPNET_VERSION \ # Set the default console formatter to JSON Logging__Console__FormatterName=Json diff --git a/src/aspnet/6.0/focal/arm64v8/Dockerfile b/src/aspnet/6.0/focal/arm64v8/Dockerfile index 442725b582..0c86239b23 100644 --- a/src/aspnet/6.0/focal/arm64v8/Dockerfile +++ b/src/aspnet/6.0/focal/arm64v8/Dockerfile @@ -18,6 +18,7 @@ FROM $REPO:6.0-focal-arm64v8 ARG ASPNET_VERSION ENV \ + # ASP.NET Core version ASPNET_VERSION=$ASPNET_VERSION \ # Set the default console formatter to JSON Logging__Console__FormatterName=Json diff --git a/src/aspnet/6.0/nanoserver-1809/amd64/Dockerfile b/src/aspnet/6.0/nanoserver-1809/amd64/Dockerfile index 0c71aa09da..50fd98faf6 100644 --- a/src/aspnet/6.0/nanoserver-1809/amd64/Dockerfile +++ b/src/aspnet/6.0/nanoserver-1809/amd64/Dockerfile @@ -27,6 +27,7 @@ FROM $REPO:6.0-nanoserver-1809 ARG ASPNET_VERSION ENV ` + # ASP.NET Core version ASPNET_VERSION=$ASPNET_VERSION ` # Set the default console formatter to JSON Logging__Console__FormatterName=Json diff --git a/src/aspnet/6.0/nanoserver-1909/amd64/Dockerfile b/src/aspnet/6.0/nanoserver-1909/amd64/Dockerfile index 78f102a9d0..90cd0bdfc7 100644 --- a/src/aspnet/6.0/nanoserver-1909/amd64/Dockerfile +++ b/src/aspnet/6.0/nanoserver-1909/amd64/Dockerfile @@ -27,6 +27,7 @@ FROM $REPO:6.0-nanoserver-1909 ARG ASPNET_VERSION ENV ` + # ASP.NET Core version ASPNET_VERSION=$ASPNET_VERSION ` # Set the default console formatter to JSON Logging__Console__FormatterName=Json diff --git a/src/aspnet/6.0/nanoserver-2004/amd64/Dockerfile b/src/aspnet/6.0/nanoserver-2004/amd64/Dockerfile index baa5bdf843..c36888a755 100644 --- a/src/aspnet/6.0/nanoserver-2004/amd64/Dockerfile +++ b/src/aspnet/6.0/nanoserver-2004/amd64/Dockerfile @@ -27,6 +27,7 @@ FROM $REPO:6.0-nanoserver-2004 ARG ASPNET_VERSION ENV ` + # ASP.NET Core version ASPNET_VERSION=$ASPNET_VERSION ` # Set the default console formatter to JSON Logging__Console__FormatterName=Json diff --git a/src/aspnet/6.0/nanoserver-20H2/amd64/Dockerfile b/src/aspnet/6.0/nanoserver-20H2/amd64/Dockerfile index 4b059d72fc..41e902eda8 100644 --- a/src/aspnet/6.0/nanoserver-20H2/amd64/Dockerfile +++ b/src/aspnet/6.0/nanoserver-20H2/amd64/Dockerfile @@ -27,6 +27,7 @@ FROM $REPO:6.0-nanoserver-20H2 ARG ASPNET_VERSION ENV ` + # ASP.NET Core version ASPNET_VERSION=$ASPNET_VERSION ` # Set the default console formatter to JSON Logging__Console__FormatterName=Json diff --git a/src/aspnet/6.0/windowsservercore-ltsc2019/amd64/Dockerfile b/src/aspnet/6.0/windowsservercore-ltsc2019/amd64/Dockerfile index f0bd5f76f9..fb28b090e6 100644 --- a/src/aspnet/6.0/windowsservercore-ltsc2019/amd64/Dockerfile +++ b/src/aspnet/6.0/windowsservercore-ltsc2019/amd64/Dockerfile @@ -4,6 +4,7 @@ ARG REPO=mcr.microsoft.com/dotnet/runtime FROM $REPO:6.0-windowsservercore-ltsc2019 ENV ` + # ASP.NET Core version ASPNET_VERSION=6.0.0-preview.4.21213.1 ` # Set the default console formatter to JSON Logging__Console__FormatterName=Json