mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 14:20:29 +01:00
docker image netstandard2.0 failed to start due to unable to configure HTTPS endpoint #271
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @yunj on GitHub (May 16, 2020).
Originally assigned to: @StefH on GitHub.
Here documents that when using netstandard, WireMock.Net uses a self signed certificate to host https urls. But when docker run
sheyenrath/wiremock.net:1.2.6with--Urls http://localhost:9091 https://localhost:9443, it failed to start due to the error Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found.Does it mean I need to build a new image with certificate installed? Thanks a lot!
@StefH commented on GitHub (May 16, 2020):
What I normally do is just run and start the container in Azure with no additional port or url settings.
Only these parameters
--StartAdminInterface true --AdminUsername xxx--AdminPassword xxx --UseSSL true --WireMockLogger WireMockConsoleLoggerWhen running in Azure I can access the service at http and https.
WireMock.Net uses a self signed certificate when running in your unit tests.
@yunj commented on GitHub (May 16, 2020):
Hi @StefH , thanks very much for your reply.
I can only run the Wiremock.Net container on a normal computer. I tried
--UseSSLbut seems not working and the server settings showUseSSL:null.@StefH commented on GitHub (May 16, 2020):
What you need to do is provide the URLs as you did before (
--Urls http://localhost:9091 https://localhost:9443)And then take a look at this article: https://www.vivienfabing.com/docker/2019/10/03/docker-aspnetcore-container-and-https.html
I think this describes how to solve your issue. However, I did not yet test this myself.
@yunj commented on GitHub (May 21, 2020):
Thanks @StefH for your reply. For the container in Azure, what are the values for
ASPNETCORE_URLS,ASPNETCORE_HTTPS_PORT,ASPNETCORE_Kestrel__Certificates__Default__Path?@StefH commented on GitHub (May 21, 2020):
When deploying WireMock.Net to Azure, I just use this deployment:
And the only things I provide are:
--StartAdminInterface true --AdminUsername xxx --AdminPassword xxx --UseSSL true --WireMockLogger WireMockConsoleLoggerNow I can access wiremock via https
Example:
https://wiremock-090dee8d-d6dc-4754-bd61-8372acd20ded.azurewebsites.net/
@StefH commented on GitHub (Jul 7, 2020):
@yunj
Does this answer your question?
@yunj commented on GitHub (Jul 9, 2020):
@StefH thanks very much. We decided to use http.