-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
21 lines (18 loc) · 773 Bytes
/
Dockerfile
File metadata and controls
21 lines (18 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM --platform=linux/arm64 mcr.microsoft.com/dotnet/aspnet:7.0-jammy-arm64v8 AS base
COPY ["./auxbin/speedtest", "/bin/"]
RUN apt update && apt install iperf3 -y -f
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/sdk:7.0.102-jammy-amd64 AS build
WORKDIR /src
COPY ["NRpiMonitor/NRpiMonitor.csproj", "NRpiMonitor/"]
RUN dotnet restore -r linux-arm64 "NRpiMonitor/NRpiMonitor.csproj"
COPY . .
WORKDIR "/src/NRpiMonitor"
RUN dotnet build "NRpiMonitor.csproj" -c Release -o /app/build --no-restore -r linux-arm64 --no-self-contained
FROM build AS publish
RUN dotnet publish "NRpiMonitor.csproj" -c Release -r linux-arm64 --no-self-contained -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "NRpiMonitor.dll"]