24 lines
1.2 KiB
Docker
24 lines
1.2 KiB
Docker
# ── Build stage ──────────────────────────────────────────────────────────────
|
|
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
|
WORKDIR /src
|
|
|
|
COPY ["ControlPlane.Worker/ControlPlane.Worker.csproj", "ControlPlane.Worker/"]
|
|
COPY ["ControlPlane.Core/ControlPlane.Core.csproj", "ControlPlane.Core/"]
|
|
COPY ["Clarity.ServiceDefaults/Clarity.ServiceDefaults.csproj", "Clarity.ServiceDefaults/"]
|
|
COPY ["Directory.Packages.props", "./"]
|
|
|
|
RUN dotnet restore "ControlPlane.Worker/ControlPlane.Worker.csproj"
|
|
|
|
COPY . .
|
|
RUN dotnet publish "ControlPlane.Worker/ControlPlane.Worker.csproj" \
|
|
-c Release -o /app/publish --no-restore
|
|
|
|
# ── Runtime stage ─────────────────────────────────────────────────────────────
|
|
# SDK image — required so BuildConsumer can invoke `dotnet build` on cloned repos.
|
|
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS runtime
|
|
WORKDIR /app
|
|
|
|
COPY --from=build /app/publish .
|
|
|
|
ENTRYPOINT ["dotnet", "ControlPlane.Worker.dll"]
|