#Background:
1 messages ยท Page 1 of 1 (latest)
There are a couple ways you can go about it:
- Clone repo B using
dag.Gitwhich will give you a Directory and call DockerBuild on - Pass a git reference to your function as a directory and do the same: https://docs.dagger.io/api/remote-modules/
- Clone the repo manually...I think you can guess ๐
Dagger supports the use of HTTP and SSH protocols for accessing remote repositories as Dagger modules, compatible with all major Git hosting platforms such as GitHub, GitLab, BitBucket, Azure DevOps, Codeberg, and Sourcehut. For SSH references ("refs"), Dagger employs a unified authentication approach.
some maybe working psuedocode:
func (m *MyModule) Build(dir *dagger.Directory) *dagger.Container {
return dir.DockerBuild()
}
or
func (m *MyModule) Build(repo string) *dagger.Container {
return dag.Git(repo).Head().Tree().DockerBuild()
}
Oh interesting! I didn't realize ti woudl be so straightforward.
Yup it's built in ๐ here's the documentation for DockerBuild https://pkg.go.dev/dagger.io/dagger#Directory.DockerBuild