-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (45 loc) · 2.4 KB
/
Dockerfile
File metadata and controls
53 lines (45 loc) · 2.4 KB
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
43
44
45
46
47
48
49
50
51
52
53
ARG REPO=mcr.microsoft.com/dotnet/aspnet
# Installer image
FROM mcr.microsoft.com/azurelinux/base/core:3.0 AS installer
RUN tdnf install -y \
ca-certificates \
gzip \
tar \
&& tdnf clean all
# Retrieve .NET Monitor Base
RUN dotnet_monitor_version=10.0.2 \
&& curl --fail --show-error --location \
--remote-name https://builds.dotnet.microsoft.com/dotnet/diagnostics/monitor/$dotnet_monitor_version/dotnet-monitor-base-$dotnet_monitor_version-linux-arm64.tar.gz \
--remote-name https://builds.dotnet.microsoft.com/dotnet/diagnostics/monitor/$dotnet_monitor_version/dotnet-monitor-base-$dotnet_monitor_version-linux-arm64.tar.gz.sha512 \
&& echo "$(cat dotnet-monitor-base-$dotnet_monitor_version-linux-arm64.tar.gz.sha512) dotnet-monitor-base-$dotnet_monitor_version-linux-arm64.tar.gz" | sha512sum -c - \
&& mkdir --parents /app \
&& tar --gzip --extract --no-same-owner --file dotnet-monitor-base-$dotnet_monitor_version-linux-arm64.tar.gz --directory /app \
&& rm \
dotnet-monitor-base-$dotnet_monitor_version-linux-arm64.tar.gz \
dotnet-monitor-base-$dotnet_monitor_version-linux-arm64.tar.gz.sha512
# .NET Monitor Base image
FROM $REPO:10.0.8-azurelinux3.0-distroless-arm64v8
WORKDIR /app
COPY --from=installer /app .
ENV \
# Unset ASPNETCORE_HTTP_PORTS from aspnet base image
ASPNETCORE_HTTP_PORTS= \
# 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 \
# Server GC mode
DOTNET_gcServer=1 \
# 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" ]
CMD [ "collect", "--urls", "https://+:52323", "--metricUrls", "http://+:52325" ]