Skip to content

Commit

Permalink
Set default logging style in runtime images, unset it in build images.
Browse files Browse the repository at this point in the history
  • Loading branch information
aslicerh committed Oct 14, 2021
1 parent b4e515c commit 2b9b35c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions 6.0/build/Dockerfile.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ LABEL name="fedora/dotnet-60" \
LABEL com.redhat.dev-mode="DEV_MODE:false" \
com.redhat.deployments-dir="/opt/app-root/src"

# For sdk, stop using json as the default logger
# See: https://github.com/dotnet/dotnet-docker/issues/2725
ENV Logging__Console__FormatterName=

# Switch to root for package installs
USER 0

Expand Down
4 changes: 4 additions & 0 deletions 6.0/build/Dockerfile.rhel8
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ LABEL name="ubi8/dotnet-60" \
LABEL com.redhat.dev-mode="DEV_MODE:false" \
com.redhat.deployments-dir="/opt/app-root/src"

# For sdk, stop using json as the default logger
# See: https://github.com/dotnet/dotnet-docker/issues/2725
ENV Logging__Console__FormatterName=

# Switch to root for package installs
USER 0

Expand Down
5 changes: 5 additions & 0 deletions 6.0/runtime/Dockerfile.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ LABEL name="fedora/dotnet-60-runtime" \
# Don't download/extract docs for nuget packages
ENV NUGET_XMLDOC_MODE=skip


# For runtime, default to using json
# See: https://github.com/dotnet/dotnet-docker/issues/2725
ENV Logging__Console__FormatterName=Json

## By default, ASP.NET Core runs on port 5000. We configure it to match
## the container port.
ENV ASPNETCORE_URLS=http://*:8080
Expand Down
4 changes: 4 additions & 0 deletions 6.0/runtime/Dockerfile.rhel8
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ LABEL name="ubi8/dotnet-60-runtime" \
# Don't download/extract docs for nuget packages
ENV NUGET_XMLDOC_MODE=skip

# For runtime, default to using json
# See: https://github.com/dotnet/dotnet-docker/issues/2725
ENV Logging__Console__FormatterName=Json

## By default, ASP.NET Core runs on port 5000. We configure it to match
## the container port.
ENV ASPNETCORE_URLS=http://*:8080
Expand Down

0 comments on commit 2b9b35c

Please sign in to comment.