CodeLiturgy.Dashboard/BlueWest.Api.Gateway/Dockerfile

19 lines
614 B
Docker
Raw Normal View History

2022-08-19 19:47:35 +03:00
FROM mcr.microsoft.com/dotnet/runtime:6.0 AS base
WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["BlueWest.Api.Gateway/BlueWest.Api.Gateway.csproj", "BlueWest.Api.Gateway/"]
RUN dotnet restore "BlueWest.Api.Gateway/BlueWest.Api.Gateway.csproj"
COPY . .
WORKDIR "/src/BlueWest.Api.Gateway"
RUN dotnet build "BlueWest.Api.Gateway.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "BlueWest.Api.Gateway.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "BlueWest.Api.Gateway.dll"]