#kubernetes

1 messages · Page 1 of 1 (latest)

hexed nymph
#

Hi, how would define a Dagger function (sdk=go) that just builds the already existing project's Dockerfile?

fallen lagoon
#
// Build a container for the app, using the default Dockerfile
func (m *MyApp) BuildContainer(
  // +optional
  // +defaultPath="."
  source *dagger.Directory,
) *dagger.Container {
  return source.DockerBuild()
}
#

This 👆 allows calling:

dagger call -m github.com/your/app build
#

or if you're in a local checkout: dagger call build

hexed nymph
#

Thanks a lot, I get it now!!