Files
Heimdall/docker/Dockerfile.agent
T
arnaud.dartois 89c4c43922
Heimdall Gitea / Detect CI scope (push) Successful in 7s
Heimdall Gitea / Build and tests (push) Successful in 14m48s
Heimdall Gitea / Publish versioned release (push) Skipped
Heimdall Gitea / Build and scan server image (push) Successful in 4m27s
Heimdall Gitea / Build and scan agent image (push) Successful in 15m42s
Heimdall Gitea / Publish Docker Hub latest tags (push) Successful in 1m27s
Heimdall Gitea / CI policy (push) Successful in 2s
fix(identity): harden user lifecycle and permissions (#136)
Co-authored-by: Arnaud Dartois <admin@tordais.cc>
2026-11-04 13:33:30 +01:00

24 lines
1.3 KiB
Docker

# CPU agent: use glibc for ONNX native dependencies. GPU variants need a
# separately validated .NET/native-library runtime and are not published here.
FROM mcr.microsoft.com/dotnet/sdk:10.0-noble@sha256:de4fe90a98845d75910b9769662465c84de1a934665c431279d1382b2bddc02b AS build
WORKDIR /src
ARG VERSION=0.0.0-local
ARG TARGET_RUNTIME=cpu
RUN test "$TARGET_RUNTIME" = cpu
COPY global.json Directory.Build.props Directory.Build.targets ./
COPY src/ ./src/
RUN dotnet restore src/Heimdall.Agent/Heimdall.Agent.csproj --locked-mode
RUN dotnet publish src/Heimdall.Agent/Heimdall.Agent.csproj -c Release --no-restore -o /out -p:Version=$VERSION -p:ContinuousIntegrationBuild=true
FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble@sha256:de0ee358cdd672f7017a003bed21e9ac9ed48a27c922a59b18175b6e82fa7fee
WORKDIR /app
RUN apt-get update -qq && apt-get install -y --no-install-recommends ffmpeg wget libgomp1 tzdata && rm -rf /var/lib/apt/lists/*
RUN install -d -m 0700 -o 1654 -g 1654 /var/lib/heimdall
ENV ASPNETCORE_URLS=http://127.0.0.1:8080
COPY --from=build /out/ ./
COPY models/yolov8n.onnx ./models/yolov8n.onnx
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s CMD wget -q --spider http://127.0.0.1:8080/healthz || exit 1
USER 1654:1654
ENTRYPOINT ["dotnet", "Heimdall.Agent.dll"]