-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (20 loc) · 919 Bytes
/
Dockerfile
File metadata and controls
28 lines (20 loc) · 919 Bytes
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
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
EXPOSE 8079
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY ["EventFlow.Presentation/EventFlow.Presentation.csproj", "EventFlow.Presentation/"]
COPY ["EventFlow.Application/EventFlow.Application.csproj", "EventFlow.Application/"]
COPY ["EventFlow.Core/EventFlow.Core.csproj", "EventFlow.Core/"]
COPY ["EventFlow.Infrastructure/EventFlow.Infrastructure.csproj", "EventFlow.Infrastructure/"]
RUN dotnet restore "EventFlow.Presentation/EventFlow.Presentation.csproj"
COPY . .
WORKDIR "/src/EventFlow.Presentation"
RUN dotnet build "EventFlow.Presentation.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "EventFlow.Presentation.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
USER app
ENTRYPOINT ["dotnet", "EventFlow.Presentation.dll"]