diff --git a/eng/dockerfile-templates/aspnet/6.0/Dockerfile.alpine b/eng/dockerfile-templates/aspnet/6.0/Dockerfile.alpine index b20d237424..ffb6a05a47 100644 --- a/eng/dockerfile-templates/aspnet/6.0/Dockerfile.alpine +++ b/eng/dockerfile-templates/aspnet/6.0/Dockerfile.alpine @@ -1,9 +1,13 @@ 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 \ + # ASP.NET Core version + 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..0c3f0345a5 100644 --- a/eng/dockerfile-templates/aspnet/6.0/Dockerfile.linux +++ b/eng/dockerfile-templates/aspnet/6.0/Dockerfile.linux @@ -17,6 +17,10 @@ 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 \ + # ASP.NET Core version + 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..38f47532ea 100644 --- a/eng/dockerfile-templates/aspnet/6.0/Dockerfile.nanoserver +++ b/eng/dockerfile-templates/aspnet/6.0/Dockerfile.nanoserver @@ -26,6 +26,10 @@ 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 ` + # ASP.NET Core version + 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..3cd1426f16 100644 --- a/eng/dockerfile-templates/aspnet/6.0/Dockerfile.windowsservercore +++ b/eng/dockerfile-templates/aspnet/6.0/Dockerfile.windowsservercore @@ -3,7 +3,11 @@ ARG REPO=mcr.microsoft.com/dotnet/runtime FROM $REPO:6.0-{{OS_VERSION}} -ENV ASPNET_VERSION={{VARIABLES["aspnet|6.0|build-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 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 aeb3c3e030..30cf2e998b 100644 --- a/src/aspnet/6.0/alpine3.13/amd64/Dockerfile +++ b/src/aspnet/6.0/alpine3.13/amd64/Dockerfile @@ -1,9 +1,13 @@ 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.3.21201.13 +ENV \ + # ASP.NET Core version + ASPNET_VERSION=6.0.0-preview.3.21201.13 \ + # 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='80d451713218d1d0ce89d5d0e5205d82811e0a58aac299403cb7fd305f5f70acbe3b21854d2ff85d7666a48a083571c7ea661c7499f8900cac6571732876f831' \ && 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 9af31920d6..6113dbd7f4 100644 --- a/src/aspnet/6.0/alpine3.13/arm32v7/Dockerfile +++ b/src/aspnet/6.0/alpine3.13/arm32v7/Dockerfile @@ -1,9 +1,13 @@ 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.3.21201.13 +ENV \ + # ASP.NET Core version + ASPNET_VERSION=6.0.0-preview.3.21201.13 \ + # 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='afd79e40125db4fc6907b4900060f76590762555d89c4baefb9fd87cd4e522db5144e59d777c7c9ecc51c9478b8f61cb921a8f17b48e36940f1e4cf7f1b24e09' \ && 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 fa4984031d..2e34594245 100644 --- a/src/aspnet/6.0/alpine3.13/arm64v8/Dockerfile +++ b/src/aspnet/6.0/alpine3.13/arm64v8/Dockerfile @@ -1,9 +1,13 @@ 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.3.21201.13 +ENV \ + # ASP.NET Core version + ASPNET_VERSION=6.0.0-preview.3.21201.13 \ + # 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='09211c57972a5b2751cf6ba8947d62088974e73fdd1db4e52674dd460dc743ed58180e89434563170b99d735eec0fb88ac4c641076cbfe618c5d83a7708d9925' \ && 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 b1e53034df..39a7663e9f 100644 --- a/src/aspnet/6.0/bullseye-slim/amd64/Dockerfile +++ b/src/aspnet/6.0/bullseye-slim/amd64/Dockerfile @@ -17,6 +17,10 @@ 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 \ + # ASP.NET Core version + 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 1374e42095..6426f057ac 100644 --- a/src/aspnet/6.0/bullseye-slim/arm32v7/Dockerfile +++ b/src/aspnet/6.0/bullseye-slim/arm32v7/Dockerfile @@ -17,6 +17,10 @@ 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 \ + # ASP.NET Core version + 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 9ae29fb133..c2b25cb06d 100644 --- a/src/aspnet/6.0/bullseye-slim/arm64v8/Dockerfile +++ b/src/aspnet/6.0/bullseye-slim/arm64v8/Dockerfile @@ -17,6 +17,10 @@ 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 \ + # ASP.NET Core version + 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 ad0ad82129..8c52602068 100644 --- a/src/aspnet/6.0/focal/amd64/Dockerfile +++ b/src/aspnet/6.0/focal/amd64/Dockerfile @@ -17,6 +17,10 @@ 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 \ + # ASP.NET Core version + 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 8207576d6d..18c8ea8b78 100644 --- a/src/aspnet/6.0/focal/arm32v7/Dockerfile +++ b/src/aspnet/6.0/focal/arm32v7/Dockerfile @@ -17,6 +17,10 @@ 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 \ + # ASP.NET Core version + 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 df7273f002..0786d329eb 100644 --- a/src/aspnet/6.0/focal/arm64v8/Dockerfile +++ b/src/aspnet/6.0/focal/arm64v8/Dockerfile @@ -17,6 +17,10 @@ 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 \ + # ASP.NET Core version + 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 86a44021dd..d9f08a9fa2 100644 --- a/src/aspnet/6.0/nanoserver-1809/amd64/Dockerfile +++ b/src/aspnet/6.0/nanoserver-1809/amd64/Dockerfile @@ -26,6 +26,10 @@ 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 ` + # ASP.NET Core version + 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 2bee8a2b18..c1b9038a21 100644 --- a/src/aspnet/6.0/nanoserver-2004/amd64/Dockerfile +++ b/src/aspnet/6.0/nanoserver-2004/amd64/Dockerfile @@ -26,6 +26,10 @@ 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 ` + # ASP.NET Core version + 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 64568e61f5..6c53171037 100644 --- a/src/aspnet/6.0/nanoserver-20H2/amd64/Dockerfile +++ b/src/aspnet/6.0/nanoserver-20H2/amd64/Dockerfile @@ -26,6 +26,10 @@ 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 ` + # ASP.NET Core version + 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 fae7ff0caa..360e3e1ed4 100644 --- a/src/aspnet/6.0/windowsservercore-ltsc2019/amd64/Dockerfile +++ b/src/aspnet/6.0/windowsservercore-ltsc2019/amd64/Dockerfile @@ -3,7 +3,11 @@ ARG REPO=mcr.microsoft.com/dotnet/runtime FROM $REPO:6.0-windowsservercore-ltsc2019 -ENV ASPNET_VERSION=6.0.0-preview.3.21201.13 +ENV ` + # ASP.NET Core version + ASPNET_VERSION=6.0.0-preview.3.21201.13 ` + # 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 1ce3581368..687ed49b6b 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 5664860b80..99f84d79a7 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 6159facd2c..12b31f4385 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 38d0602323..88bbc7c8f2 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.3.21202.5 \ # 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 9e24186b55..1e53c62eea 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.3.21202.5 \ # 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 e28effec01..d56ed18f05 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.3.21202.5 \ # 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 a926e3708f..9aa7e6dc4f 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.3.21202.5 \ # 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 11359c0768..07e1f471d2 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.3.21202.5 \ # 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 9c0be9cb25..861ab5d736 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.3.21202.5 \ # 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 33220b04bc..4699de4686 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-2004/amd64/Dockerfile b/src/sdk/6.0/nanoserver-2004/amd64/Dockerfile index 168599b505..10ae4d834d 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 7b09cd487e..8a4579c4d1 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 ffa37a2de1..9f60e37351 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.3.21202.5 ` # 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))