-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
22 lines (19 loc) · 1 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
ARG BUILD_CONFIGURATION=Release
COPY ["PriceNegotiationAPI/PriceNegotiationAPI.csproj", "PriceNegotiationAPI/"]
COPY ["PriceNegotiationAPI.Domain/PriceNegotiationAPI.Domain.csproj", "PriceNegotiationAPI.Domain/"]
COPY ["PriceNegotiationAPI.Infrastructure/PriceNegotiationAPI.Infrastructure.csproj", "PriceNegotiationAPI.Infrastructure/"]
COPY ["PriceNegotiationAPI.Application/PriceNegotiationAPI.Application.csproj", "PriceNegotiationAPI.Application/"]
RUN dotnet restore "PriceNegotiationAPI/PriceNegotiationAPI.csproj"
COPY . .
WORKDIR "PriceNegotiationAPI"
RUN dotnet build "PriceNegotiationAPI.csproj" -c $BUILD_CONFIGURATION -o /build
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "PriceNegotiationAPI.csproj" -c $BUILD_CONFIGURATION -o /publish /p:UseAppHost=false
FROM base AS final
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "PriceNegotiationAPI.dll"]