Hi, I would like to have a function that mounts the Docker socket in a container. So far I have been able to do that passing the socket via CLI, but I would like to either give a default value or mount it implicitly.
How can I do that?
@function
def client(
self, docker_socket: dagger.Socket = dag.load_socket_from_id("/var/run/docker.sock")
) -> dagger.Container:
return (
dag.container()
.from_("quay.io/singularity/docker2singularity")
.with_unix_socket("/var/run/docker.sock", docker_socket)
)