MCPcopy Create free account
hub / github.com/dagger/dagger / with_service_binding

Method with_service_binding

sdk/python/src/dagger/client/gen.py:3556–3582  ·  view source on GitHub ↗

Establish a runtime dependency from a container to a network service. The service will be started automatically when needed and detached when it is no longer needed, executing the default command if none is set. The service will be reachable from the container via t

(self, alias: str, service: "Service")

Source from the content-addressed store, hash-verified

3554 return Container(_ctx)
3555
3556 def with_service_binding(self, alias: str, service: "Service") -> Self:
3557 """Establish a runtime dependency from a container to a network service.
3558
3559 The service will be started automatically when needed and detached
3560 when it is no longer needed, executing the default command if none is
3561 set.
3562
3563 The service will be reachable from the container via the provided
3564 hostname alias.
3565
3566 The service dependency will also convey to any files or directories
3567 produced by the container.
3568
3569 Parameters
3570 ----------
3571 alias:
3572 Hostname that will resolve to the target service (only accessible
3573 from within this container)
3574 service:
3575 The target service
3576 """
3577 _args = [
3578 Arg("alias", alias),
3579 Arg("service", service),
3580 ]
3581 _ctx = self._select("withServiceBinding", _args)
3582 return Container(_ctx)
3583
3584 def with_symlink(
3585 self,

Callers 15

test_service_start_stopFunction · 0.80
user_listMethod · 0.80
user_listMethod · 0.80
redis_serviceMethod · 0.80
redis_serviceMethod · 0.80
redisMethod · 0.80
redis_serviceMethod · 0.80
testMethod · 0.80
redis_serviceMethod · 0.80
getMethod · 0.80
user_listMethod · 0.80
user_listMethod · 0.80

Calls 3

ArgClass · 0.90
_selectMethod · 0.80
ContainerClass · 0.70

Tested by 1

test_service_start_stopFunction · 0.64