27 lines
788 B
Docker
27 lines
788 B
Docker
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS base
|
|
|
|
COPY *.sln .
|
|
COPY Selector/*.csproj ./Selector/
|
|
COPY Selector.Cache/*.csproj ./Selector.Cache/
|
|
COPY Selector.Event/*.csproj ./Selector.Event/
|
|
COPY Selector.Model/*.csproj ./Selector.Model/
|
|
COPY Selector.Web/*.csproj ./Selector.Web/
|
|
COPY Selector.Tests/*.csproj ./Selector.Tests/
|
|
RUN dotnet restore ./Selector.Web/Selector.Web.csproj
|
|
|
|
COPY . ./
|
|
|
|
FROM base as test
|
|
RUN dotnet restore ./Selector.Tests/Selector.Tests.csproj
|
|
RUN dotnet test --no-restore --verbosity normal
|
|
|
|
FROM base as publish
|
|
RUN dotnet publish Selector.Web/Selector.Web.csproj -c Release -o /app --no-restore
|
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:6.0
|
|
EXPOSE 80
|
|
WORKDIR /app
|
|
COPY --from=publish /app ./
|
|
ENV DOTNET_EnableDiagnostics=0
|
|
ENTRYPOINT ["dotnet", "Selector.Web.dll"]
|