jhodges
❔ Docker Build multiple microservices from a monorepo
I am looking for some examples, samples, guidance on the most efficient way to do a docker build in a monorepo with multiple microservices.
Currently our process involves a build-and-test docker file that, as you might guess, builds the code and runs all the commit stage tests. Then there are numerous dockerfiles for each of the microservices that use a multistage build referencing the final stage of the build-and-test dockerfile.
This works, albeit slowly. I'm wondering if there is a better way? Any examples or samples you could point to would be really helpful.
23 replies
❔ ✅ 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?32 replies