46 lines
1.5 KiB
Docker
46 lines
1.5 KiB
Docker
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
|
|
WORKDIR /app
|
|
#EXPOSE 80
|
|
#EXPOSE 443
|
|
|
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
|
WORKDIR /src
|
|
|
|
COPY ["BlueWest.Data.Capital/BlueWest.Data.Capital.csproj", "BlueWest.Data.Capital/"]
|
|
RUN dotnet restore "BlueWest.Data.Capital/BlueWest.Data.Capital.csproj"
|
|
|
|
|
|
COPY ["BlueWest/BlueWest.csproj", "BlueWest/"]
|
|
RUN dotnet restore "BlueWest/BlueWest.csproj"
|
|
|
|
|
|
COPY ["BlueWest.Data.Geography/BlueWest.Data.Geography.csproj", "BlueWest.Data.Geography/"]
|
|
RUN dotnet restore "BlueWest.Data.Geography/BlueWest.Data.Geography.csproj"
|
|
|
|
|
|
COPY ["BlueWest.Api/BlueWest.Api.csproj", "BlueWest.Api/"]
|
|
RUN dotnet restore "BlueWest.Api/BlueWest.Api.csproj"
|
|
|
|
|
|
COPY ["include/BlueWest.MapTo/src/BlueWest.MapTo/BlueWest.MapTo.csproj", "include/BlueWest.MapTo/src/BlueWest.MapTo/"]
|
|
RUN dotnet restore "include/BlueWest.MapTo/src/BlueWest.MapTo/BlueWest.MapTo.csproj"
|
|
|
|
COPY ["include/Math-Expression-Evaluator/SimpleExpressionEvaluator/SimpleExpressionEvaluator.csproj", "include/Math-Expression-Evaluator/SimpleExpressionEvaluator/"]
|
|
RUN dotnet restore "include/Math-Expression-Evaluator/SimpleExpressionEvaluator/SimpleExpressionEvaluator.csproj"
|
|
|
|
|
|
COPY [".", "."]
|
|
|
|
RUN dotnet build "BlueWest.Api/BlueWest.Api.csproj" -c Release -o /app/build
|
|
|
|
FROM build AS publish
|
|
RUN dotnet publish "BlueWest.Api/BlueWest.Api.csproj" -c Release -o /app/publish --self-contained false
|
|
|
|
FROM base AS final
|
|
WORKDIR /app
|
|
COPY --from=publish /app/publish .
|
|
ENV ASPNETCORE_URLS http://0.0.0.0:80
|
|
WORKDIR /app
|
|
ENTRYPOINT ["dotnet", "BlueWest.Api.dll" ]
|