-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
Dockerfile
42 lines (34 loc) · 1.86 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
ARG REPO=mcr.microsoft.com/dotnet/aspnet
# Installer image
FROM amd64/buildpack-deps:jammy-curl AS installer
# Retrieve .NET Monitor
RUN dotnet_monitor_version=6.3.10 \
&& curl -fSL --output dotnet-monitor.tar.gz https://dotnetcli.azureedge.net/dotnet/diagnostics/monitor/$dotnet_monitor_version/dotnet-monitor-$dotnet_monitor_version-linux-x64.tar.gz \
&& dotnet_monitor_sha512='2a559ef8aa6c020f954640bf5ce5e62ffcc5f89978c4959f7e870c145001cac8c15558031b2b005c3696cfe5fc4c4ee88452b058242dfeacebe0bd551dd24d03' \
&& echo "$dotnet_monitor_sha512 dotnet-monitor.tar.gz" | sha512sum -c - \
&& mkdir -p /app \
&& tar -oxzf dotnet-monitor.tar.gz -C /app \
&& rm dotnet-monitor.tar.gz
# .NET Monitor image
FROM $REPO:6.0.36-jammy-chiseled-amd64
COPY --from=installer ["/app", "/app"]
WORKDIR /app
ENV \
# Unset ASPNETCORE_URLS from aspnet base image
ASPNETCORE_URLS= \
# Disable debugger and profiler diagnostics to avoid diagnosing self.
COMPlus_EnableDiagnostics=0 \
# Default Filter
DefaultProcess__Filters__0__Key=ProcessId \
DefaultProcess__Filters__0__Value=1 \
# Remove Unix Domain Socket before starting diagnostic port server
DiagnosticPort__DeleteEndpointOnStartup=true \
# Logging: JSON format so that analytic platforms can get discrete entry information
Logging__Console__FormatterName=json \
# Logging: Use round-trip date/time format without timezone information (always logged in UTC)
Logging__Console__FormatterOptions__TimestampFormat=yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffff'Z' \
# Logging: Write timestamps using UTC offset (+0:00)
Logging__Console__FormatterOptions__UseUtcTimestamp=true \
# Add dotnet-monitor path to front of PATH for easier, prioritized execution
PATH="/app:${PATH}"
ENTRYPOINT [ "dotnet-monitor", "collect", "--urls", "https://+:52323", "--metricUrls", "http://+:52325" ]