Sorry if this has been answered somewhere, but I can't seem to find it and can't make much sense of it. Also probably quite noobish question or maybe i'm "holding it the wrong way"
But all I want to do, similar to a Dockerfile is to copy a file or a directory which has a well known, and is not supposed to change I don't want to have to provide the flag as described in the docs at: https://docs.dagger.io/cookbook/#copy-a-local-or-remote-file-to-a-container or the --source=. flags.
What I want to achieve is to do something as simple as this:
func (m *MyProject) Build() *dagger.Container {
return dag.Container().From("python/3.12.2-alpine").
WithWorkdir("/app").
WithDirectory("/src", "/src" ).
WithFile("./foo.txt", "foo.txt").
WithEnvVariable("TESTING", "false").
WithEnvVariable("AURORA_VIDEO_SOURCE").
WithExposedPort("8000").
WithExec([]string{"pip", "install", "-r", "requirements.txt"}).
WithEntrypoint([]string{"python", "./src/detector.py"})
}
My experience with go is still rather limited, And I still can't wrap my head around the *dagger.File and *dagger.Directory requirements in the WithDirecotory() and WithFile() functions.
Thanks a lot for your time!