question

HarshanandWankhede-3316 avatar image
1 Vote"
HarshanandWankhede-3316 asked Bruce-SqlWork answered

Deploy ASP.Net COre app on docker container over HTTPS

Hi,

We are trying to deploy ASP.Net core web app on docker container which is configured to listen on port 443 over HTTPS. It is giving "No Certificate found" error but we have certificate on Azure Key vault. Can someone know how to use SSL certificate from Azure Key Vault with ASP.Net core app .

Thanks in Advance.

dotnet-aspnet-core-mvcazure-key-vaultazure-webapps-ssl-certificatesdotnet-ad
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @HarshanandWankhede-3316,

Just checking in to see if the below answer helped. If this answers your query, please don’t forget to click "Accept the answer" and Up-Vote for the same, which might be beneficial to other community members reading this thread. And, if you have any further query do let us know.

Thanks,
Shweta



0 Votes 0 ·
ShwetaMathur avatar image
0 Votes"
ShwetaMathur answered

Hi @HarshanandWankhede-3316,

Thanks for reaching out.

I understand you are getting error while deploying the ASP.Net core applications with Docker over HTTPS

Docker needs a certificate to process HTTPS requests.
Below are the steps you required to deploy the ASP.net core with docker are:

  1. Create the certificate. Make sure to set the password to use the certificate with docker.

  2. Provide the certificate to the docker image.

Reference sample: https://github.com/dotnet/dotnet-docker/blob/main/samples/run-aspnetcore-https-development.md
https://docs.microsoft.com/en-us/aspnet/core/security/docker-compose-https?view=aspnetcore-6.0

Hope this will help.

Thanks,
Shweta


Please remember to "Accept Answer" if answer helped you.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

yogyogi avatar image
0 Votes"
yogyogi answered

You have to use volumes in docker-compose.yml to point out the location of ssl certificate. This tutorial will help you - Deploy a Docker based ASP.NET Core app to Azure


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Bruce-SqlWork avatar image
0 Votes"
Bruce-SqlWork answered

While you can store a ssl certificate in azure key value, docker does not directly support this. You need to export the certificate to the proper location for docker.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.