diff --git a/templates/service/host/IdentityServerHost/Dockerfile b/templates/service/host/IdentityServerHost/Dockerfile new file mode 100644 index 0000000000..38f985b7f3 --- /dev/null +++ b/templates/service/host/IdentityServerHost/Dockerfile @@ -0,0 +1,18 @@ +FROM microsoft/dotnet:2.2-aspnetcore-runtime AS base +WORKDIR /app +EXPOSE 80 + +FROM microsoft/dotnet:2.2-sdk AS build +WORKDIR /src +COPY . . +WORKDIR /src/templates/service/host/IdentityServerHost +RUN dotnet restore -nowarn:msb3202,nu1503 +RUN dotnet build --no-restore -c Release -o /app + +FROM build AS publish +RUN dotnet publish --no-restore -c Release -o /app + +FROM base AS final +WORKDIR /app +COPY --from=publish /app . +ENTRYPOINT ["dotnet", "IdentityServerHost.dll"] diff --git a/templates/service/host/MyCompanyName.MyProjectName.Host/Dockerfile b/templates/service/host/MyCompanyName.MyProjectName.Host/Dockerfile new file mode 100644 index 0000000000..5af6a5712c --- /dev/null +++ b/templates/service/host/MyCompanyName.MyProjectName.Host/Dockerfile @@ -0,0 +1,18 @@ +FROM microsoft/dotnet:2.2-aspnetcore-runtime AS base +WORKDIR /app +EXPOSE 80 + +FROM microsoft/dotnet:2.2-sdk AS build +WORKDIR /src +COPY . . +WORKDIR /src/templates/service/host/MyCompanyName.MyProjectName.Host +RUN dotnet restore -nowarn:msb3202,nu1503 +RUN dotnet build --no-restore -c Release -o /app + +FROM build AS publish +RUN dotnet publish --no-restore -c Release -o /app + +FROM base AS final +WORKDIR /app +COPY --from=publish /app . +ENTRYPOINT ["dotnet", "MyCompanyName.MyProjectName.Host.dll"]