Is there something special about nginx-latest that makes it not able to be run in the background as a service? A minimal reproducible example taken from modifying the existing service example demonstrates that we end up with blocking behavior. Am I missing something here?
import sys
import anyio
import dagger
async def main():
# create Dagger client
async with dagger.Connection(dagger.Config(log_output=sys.stderr)) as client:
# create HTTP service container with exposed port 8080
http_srv = (
client.container()
.from_("nginx:latest")
.with_exposed_port(8080)
)
# create client container with service binding
# access HTTP service and print result
val = await (
client.container()
.from_("alpine")
.with_service_binding("www", http_srv)
.with_exec(["wget", "-O-", "http://www:8080"])
.stdout()
)
print(val)
anyio.run(main)