I can't figure out what I'm doing wrong here nor can I find an exact doc that makes it make sense.
This works.
@function
async def build(self, source: dagger.Directory) -> dagger.Container:
container = (
dag.container(platform=dagger.Platform("linux/amd64"))
.from_("python:3.11")
.with_workdir("/service")
.with_directory(".", source)
)
return await (
container
)
but this doesn't
@function
async def build(self) -> dagger.Container:
source = dagger.Directory(".")
container = (
dag.container(platform=dagger.Platform("linux/amd64"))
.from_("python:3.11")
.with_workdir("/service")
.with_directory(".", source)
)
return await (
container
)