-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
24 lines (21 loc) · 844 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim-amd64 AS build
COPY ["Directory.Build.props", "./"]
WORKDIR /src
COPY ["src/Accord.Web/Accord.Web.csproj", "src/Accord.Web/"]
COPY ["src/Accord.Bot/Accord.Bot.csproj", "src/Accord.Bot/"]
COPY ["src/Accord.Services/Accord.Services.csproj", "src/Accord.Services/"]
COPY ["src/Accord.Domain/Accord.Domain.csproj", "src/Accord.Domain/"]
RUN dotnet restore "src/Accord.Web/Accord.Web.csproj"
COPY . .
WORKDIR "/src/src/Accord.Web"
RUN dotnet build "Accord.Web.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "Accord.Web.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Accord.Web.dll"]