Selector/Dockerfile.CLI
2024-12-20 17:34:41 +00:00

27 lines
697 B
Docker

FROM mcr.microsoft.com/dotnet/sdk:9.0 AS base
COPY *.sln .
COPY Selector/*.csproj ./Selector/
COPY Selector.Cache/*.csproj ./Selector.Cache/
COPY Selector.Data/*.csproj ./Selector.Data/
COPY Selector.Event/*.csproj ./Selector.Event/
COPY Selector.Model/*.csproj ./Selector.Model/
COPY Selector.CLI/*.csproj ./Selector.CLI/
COPY Selector.Tests/*.csproj ./Selector.Tests/
RUN dotnet restore ./Selector.CLI/Selector.CLI.csproj
COPY . ./
FROM base as publish
RUN dotnet publish Selector.CLI/Selector.CLI.csproj -c Release -o /app
FROM mcr.microsoft.com/dotnet/aspnet:9.0
WORKDIR /app
COPY --from=publish /app ./
ENV DOTNET_EnableDiagnostics=0
USER app
ENTRYPOINT ["dotnet", "Selector.CLI.dll"]