From bb967c72a95a378d7ef75d888629cc24abe48a74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atakan=20=C3=96zceviz?= Date: Tue, 2 Apr 2019 12:50:29 +0200 Subject: [PATCH] Create Dockerfile --- .../service/host/IdentityServerHost/Dockerfile | 18 ++++++++++++++++++ .../Dockerfile | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 templates/service/host/IdentityServerHost/Dockerfile create mode 100644 templates/service/host/MyCompanyName.MyProjectName.Host/Dockerfile 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"]