29 lines
1.3 KiB
Docker
29 lines
1.3 KiB
Docker
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
|
|
USER $APP_UID
|
|
WORKDIR /app
|
|
EXPOSE 8080
|
|
EXPOSE 8081
|
|
|
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
|
ARG BUILD_CONFIGURATION=Release
|
|
WORKDIR /src
|
|
COPY ["NuGet.Config", "."]
|
|
COPY ["gateways/KonSoft.InternalGateway/KonSoft.InternalGateway.csproj", "gateways/KonSoft.InternalGateway/"]
|
|
COPY ["shared/KonSoft.Shared.Hosting.Gateways/KonSoft.Shared.Hosting.Gateways.csproj", "shared/KonSoft.Shared.Hosting.Gateways/"]
|
|
COPY ["shared/KonSoft.Shared.Hosting.AspNetCore/KonSoft.Shared.Hosting.AspNetCore.csproj", "shared/KonSoft.Shared.Hosting.AspNetCore/"]
|
|
COPY ["shared/KonSoft.Shared.Hosting/KonSoft.Shared.Hosting.csproj", "shared/KonSoft.Shared.Hosting/"]
|
|
COPY ["shared/KonSoft.Shared.Localization/KonSoft.Shared.Localization.csproj", "shared/KonSoft.Shared.Localization/"]
|
|
RUN dotnet restore "./gateways/KonSoft.InternalGateway/KonSoft.InternalGateway.csproj"
|
|
COPY . .
|
|
WORKDIR "/src/gateways/KonSoft.InternalGateway"
|
|
RUN dotnet build "./KonSoft.InternalGateway.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
|
|
|
FROM build AS publish
|
|
ARG BUILD_CONFIGURATION=Release
|
|
RUN dotnet publish "./KonSoft.InternalGateway.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
|
|
|
FROM base AS final
|
|
WORKDIR /app
|
|
COPY --from=publish /app/publish .
|
|
ENTRYPOINT ["dotnet", "KonSoft.InternalGateway.dll"] |