From f9c494f6fffad37343f4d38bd604717a7c5c707e Mon Sep 17 00:00:00 2001 From: yusuf karatoprak Date: Sun, 2 May 2021 20:37:40 +0300 Subject: [PATCH] added localhost.pfx in Docker --- Dockerfile.EventHub.HttpApi.Host | 2 +- Dockerfile.EventHub.IdentityServer | 2 +- Dockerfile.EventHub.Web | 2 +- localhost.conf | 23 +++++++++++++++++++++++ 4 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 localhost.conf diff --git a/Dockerfile.EventHub.HttpApi.Host b/Dockerfile.EventHub.HttpApi.Host index 2c9b6ec..0c354d8 100644 --- a/Dockerfile.EventHub.HttpApi.Host +++ b/Dockerfile.EventHub.HttpApi.Host @@ -11,7 +11,7 @@ COPY . . WORKDIR "/src/src/EventHub.HttpApi.Host" RUN dotnet dev-certs https -v -ep localhost.pfx -p e8202f07-66e5-4619-be07-72ba76fde97f -RUN dotnet dev-certs https --trust + RUN dotnet build "EventHub.HttpApi.Host.csproj" -c Release -o /app FROM build AS publish diff --git a/Dockerfile.EventHub.IdentityServer b/Dockerfile.EventHub.IdentityServer index 9825a55..2521738 100644 --- a/Dockerfile.EventHub.IdentityServer +++ b/Dockerfile.EventHub.IdentityServer @@ -11,7 +11,7 @@ COPY . . WORKDIR "/src/src/EventHub.IdentityServer" RUN dotnet dev-certs https -v -ep localhost.pfx -p e8202f07-66e5-4619-be07-72ba76fde97f -RUN dotnet dev-certs https --trust + RUN dotnet build "EventHub.IdentityServer.csproj" -c Release -o /app FROM build AS publish diff --git a/Dockerfile.EventHub.Web b/Dockerfile.EventHub.Web index 1dcdcec..48f8448 100644 --- a/Dockerfile.EventHub.Web +++ b/Dockerfile.EventHub.Web @@ -11,7 +11,7 @@ COPY . . WORKDIR "/src/src/EventHub.Web" RUN dotnet dev-certs https -v -ep localhost.pfx -p e8202f07-66e5-4619-be07-72ba76fde97f -RUN dotnet dev-certs https --trust + RUN dotnet build "EventHub.Web.csproj" -c Release -o /app FROM build AS publish diff --git a/localhost.conf b/localhost.conf new file mode 100644 index 0000000..6a46c26 --- /dev/null +++ b/localhost.conf @@ -0,0 +1,23 @@ +[req] +default_bits = 2048 +default_keyfile = localhost.key +distinguished_name = req_distinguished_name +req_extensions = req_ext +x509_extensions = v3_ca + +[req_distinguished_name] +commonName = Common Name (e.g. server FQDN or YOUR name) +commonName_default = localhost +commonName_max = 64 + +[req_ext] +subjectAltName = @alt_names + +[v3_ca] +subjectAltName = @alt_names +basicConstraints = critical, CA:false +keyUsage = keyCertSign, cRLSign, digitalSignature,keyEncipherment + +[alt_names] +DNS.1 = localhost +DNS.2 = 127.0.0.1 \ No newline at end of file