From 5e405dfea864b19924649917b5e4727c427e0889 Mon Sep 17 00:00:00 2001 From: rafsanulhasan Date: Sat, 1 Sep 2018 03:57:19 +0600 Subject: [PATCH] 1. Exposed port 443 for HTTPS 2. Updated SDK 2.1->2.1.401 3. Updated Runtime 2.1->2.1.3 4. Copy SSL certificate to Linux container's system folder for trust --- src/Services/Identity/Identity.API/Dockerfile | 6 ++++-- src/Web/WebSPA/Dockerfile | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Services/Identity/Identity.API/Dockerfile b/src/Services/Identity/Identity.API/Dockerfile index 3931a135b..7656ef331 100644 --- a/src/Services/Identity/Identity.API/Dockerfile +++ b/src/Services/Identity/Identity.API/Dockerfile @@ -1,9 +1,10 @@ ARG NODE_IMAGE=node:8.11 -FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base +FROM microsoft/dotnet:2.1.3-aspnetcore-runtime AS base WORKDIR /app EXPOSE 80 +EXPOSE 443 -FROM microsoft/dotnet:2.1-sdk as dotnet-build +FROM microsoft/dotnet:2.1.401-sdk as dotnet-build WORKDIR /src FROM ${NODE_IMAGE} as node-build @@ -16,6 +17,7 @@ FROM dotnet-build as build WORKDIR /src/src/Services/Identity/Identity.API/wwwroot COPY --from=node-build /web/wwwroot . WORKDIR /src +COPY src/Services/Identity/Identity.API/Setup/eShopOnContainers.pfx /root/.aspnet/https/ COPY . . WORKDIR /src/src/Services/Identity/Identity.API RUN dotnet restore -nowarn:msb3202,nu1503 diff --git a/src/Web/WebSPA/Dockerfile b/src/Web/WebSPA/Dockerfile index 4e806786c..3da070419 100644 --- a/src/Web/WebSPA/Dockerfile +++ b/src/Web/WebSPA/Dockerfile @@ -1,9 +1,10 @@ ARG NODE_IMAGE=node:8.11 -FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base +FROM microsoft/dotnet:2.1.3-aspnetcore-runtime AS base WORKDIR /app EXPOSE 80 +EXPOSE 443 -FROM microsoft/dotnet:2.1-sdk as dotnet-build +FROM microsoft/dotnet:2.1.401-sdk as dotnet-build WORKDIR /src FROM ${NODE_IMAGE} as node-build @@ -16,6 +17,7 @@ FROM dotnet-build as publish WORKDIR /src/src/Web/WebSPA/wwwroot COPY --from=node-build /web/wwwroot . WORKDIR /src +COPY /Certificates/eShopOnContainers.pfx /root/.aspnet/https/ COPY . . WORKDIR /src/src/Web/WebSPA RUN dotnet publish -c Release -o /app