C#C
C#3y ago
Jacob

❔ ✅ Certificates in Docker Build

So context: my team have a containerized build, Ie. dotnet restore/build/test/publish in a docker file. Some integration tests where added that spin up an API project and Use HttpClient to hit the endpoints. This all works outside of docker but running the build in a container produces an error, Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found or is out of date. Ok, makes sense as the SDK container mcr.microsoft.com/dotnet/sdk:6.0-focal has no dev cert. The question is how do I get a valid cert in the container so tests can use it? Any ideas?
Was this page helpful?