Hey, I have a question. I want to create a sonarqube dagger module that allows me to setup a local server from the sonarqube:latest container image. The function to run the server should return a *Service but before that a bunch of http requests against the sonarqube API have to be made to configure the service, e.g. create a default user, retrieve an analysis token, etc.
My initial approach was to use go's net/http after starting the service with svc.Start(), retrieve the endpoint with svc.Endpoint() and then make http.Post(endpoint) requests. This doesn't seem to work because I get hostname lookup errors.
My second attemt was to use a container with curlinstalled, create a servicebinding at the curl container towards to sonarqube container and make requests that way (via WithExec), which works but has caused me some troubles with caching, e.g. the requests are not repeated when running the function again because the layers I created by running WithExec are cached.
Any idea how I can approach this?
TLDR: Start Service -> make HTTP requests to configure service via service's API -> expose Service to use after successful configuration.
Caveat: Configuration can only happen via HTTP API, no configuration option via env-vars, etc.