📄
.containerfile
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
FROM mcr.microsoft.com/dotnet/sdk:11.0.100-preview.4 AS build
WORKDIR /app
COPY ./MMirror.slnx ./global.json ./dotnet-tools.json ./Directory.Packages.props ./Directory.Build.props ./.gitignore ./.editorconfig ./
COPY ./src/Integrations/Vasttrafik/Vasttrafik.csproj ./src/Integrations/Vasttrafik/packages.lock.json ./src/Integrations/Vasttrafik/
COPY ./src/Integrations/FaceCamera/FaceCamera.csproj ./src/Integrations/FaceCamera/packages.lock.json ./src/Integrations/FaceCamera/
COPY ./src/Integrations/Smhi/Smhi.csproj ./src/Integrations/Smhi/packages.lock.json ./src/Integrations/Smhi/
COPY ./src/Integrations/HomeAssistant/HomeAssistant.csproj ./src/Integrations/HomeAssistant/packages.lock.json ./src/Integrations/HomeAssistant/
COPY ./src/App/App.csproj ./src/App/packages.lock.json ./src/App/
RUN dotnet restore --locked-mode ./src/App/App.csproj
COPY ./src/Integrations/Vasttrafik/ ./src/Integrations/Vasttrafik/
COPY ./src/Integrations/FaceCamera/ ./src/Integrations/FaceCamera/
COPY ./src/Integrations/Smhi/ ./src/Integrations/Smhi/
COPY ./src/Integrations/HomeAssistant/ ./src/Integrations/HomeAssistant/
COPY ./src/App/ ./src/App/
ARG SixLaborsLicenseKey
ENV SixLaborsLicenseKey=${SixLaborsLicenseKey}
RUN dotnet build ./src/App/App.csproj --no-restore --configuration Release --runtime linux-arm64
RUN dotnet publish ./src/App/App.csproj --no-build --configuration Release --runtime linux-arm64 --output /output
FROM mcr.microsoft.com/dotnet/runtime:11.0.0-preview.4 AS release
WORKDIR /app
# Install DRM/KMS dependencies
RUN apt-get update && apt-get install -y kmscube libinput-tools
# Install ONNX dependencies
RUN apt-get update && apt-get install -y libgomp1
COPY --from=build /output ./
ENTRYPOINT ["dotnet", "./MMirror.App.dll"]